[llvm] r303359 - [git-llvm] Don't attempt to propget files that don't exist yet in SVN

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 10:17:18 PDT 2017


Author: rnk
Date: Thu May 18 12:17:17 2017
New Revision: 303359

URL: http://llvm.org/viewvc/llvm-project?rev=303359&view=rev
Log:
[git-llvm] Don't attempt to propget files that don't exist yet in SVN

svn propget will fail halfway through, and the patch will fail to apply.

Modified:
    llvm/trunk/utils/git-svn/git-llvm

Modified: llvm/trunk/utils/git-svn/git-llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git-svn/git-llvm?rev=303359&r1=303358&r2=303359&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-llvm (original)
+++ llvm/trunk/utils/git-svn/git-llvm Thu May 18 12:17:17 2017
@@ -202,6 +202,8 @@ def fix_eol_style_native(rev, sr, svn_sr
     files = git('diff-tree', '--no-commit-id', '--name-only', '-r', rev, '--',
                 sr).split('\n')
     files = [f.split('/', 1)[1] for f in files]
+    # Skip files that don't exist in SVN yet.
+    files = [f for f in files if os.path.exists(os.path.join(svn_sr_path, f))]
     # Use ignore_errors because 'svn propget' prints errors if the file doesn't
     # have the named property. There doesn't seem to be a way to suppress that.
     eol_props = svn(svn_sr_path, 'propget', 'svn:eol-style', *files,




More information about the llvm-commits mailing list