]> granicus.if.org Git - llvm/commitdiff
[git-llvm] Don't attempt to propget files that don't exist yet in SVN
authorReid Kleckner <rnk@google.com>
Thu, 18 May 2017 17:17:17 +0000 (17:17 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 18 May 2017 17:17:17 +0000 (17:17 +0000)
svn propget will fail halfway through, and the patch will fail to apply.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303359 91177308-0d34-0410-b5e6-96231b3b80d8

utils/git-svn/git-llvm

index 55d3129c4a8292262741511b88edb0316201597d..9309889f30dffdf2928730977e3c673ce8ed7516 100755 (executable)
@@ -202,6 +202,8 @@ def fix_eol_style_native(rev, sr, svn_sr_path):
     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,