summaryrefslogtreecommitdiffstats
path: root/llvm/utils/git-svn
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-18 17:17:17 +0000
committerReid Kleckner <rnk@google.com>2017-05-18 17:17:17 +0000
commit162c5cdf8f4057c439e26a7009f291ede4532c87 (patch)
treef92edac81e6d649aba995b32c7800e3ffa567ddf /llvm/utils/git-svn
parent8f248234faa6c86961deab2670202a098a286572 (diff)
downloadbcm5719-llvm-162c5cdf8f4057c439e26a7009f291ede4532c87.tar.gz
bcm5719-llvm-162c5cdf8f4057c439e26a7009f291ede4532c87.zip
[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. llvm-svn: 303359
Diffstat (limited to 'llvm/utils/git-svn')
-rwxr-xr-xllvm/utils/git-svn/git-llvm2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm
index 55d3129c4a8..9309889f30d 100755
--- a/llvm/utils/git-svn/git-llvm
+++ b/llvm/utils/git-svn/git-llvm
@@ -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,
OpenPOWER on IntegriCloud