diff options
author | Walter Lee <waltl@google.com> | 2017-12-22 21:19:13 +0000 |
---|---|---|
committer | Walter Lee <waltl@google.com> | 2017-12-22 21:19:13 +0000 |
commit | 4e7b8c0dce8a88f68e636bb3f3fd4564651fde0a (patch) | |
tree | 0a2c8fde2e204d29c89ff6e4c767160cfc5113f8 /utils | |
parent | 0dd51585c99b6a001d33e9c1fb90dccf183f905f (diff) |
[git-llvm] Handle files ignored by svn correctly
Summary: Correctly handle files ignored by svn (such as .o files,
which are ignored by default) by adding "--no-ignore" flag to "svn
status" and "svn add".
Differential Revision: https://reviews.llvm.org/D41404
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/git-svn/git-llvm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/git-svn/git-llvm b/utils/git-svn/git-llvm index 0d566dac430..5d9d4d29100 100755 --- a/utils/git-svn/git-llvm +++ b/utils/git-svn/git-llvm @@ -178,7 +178,7 @@ def clean_and_update_svn(svn_repo): # Unfortunately it appears there's no svn equivalent for git clean, so we # have to do it ourselves. - for line in svn(svn_repo, 'status').split('\n'): + for line in svn(svn_repo, 'status', '--no-ignore').split('\n'): if not line.startswith('?'): continue filename = line[1:].strip() @@ -252,7 +252,7 @@ def svn_push_one_rev(svn_repo, rev, dry_run): if not subrepos: raise RuntimeError('Empty diff for rev %s?' % rev) - status = svn(svn_repo, 'status') + status = svn(svn_repo, 'status', '--no-ignore') if status: die("Can't push git rev %s because svn status is not empty:\n%s" % (rev, status)) @@ -272,10 +272,11 @@ def svn_push_one_rev(svn_repo, rev, dry_run): "first?") sys.exit(2) - status_lines = svn(svn_repo, 'status').split('\n') + status_lines = svn(svn_repo, 'status', '--no-ignore').split('\n') - for l in (l for l in status_lines if l.startswith('?')): - svn(svn_repo, 'add', l[1:].strip()) + for l in (l for l in status_lines if (l.startswith('?') or + l.startswith('I'))): + svn(svn_repo, 'add', '--no-ignore', l[1:].strip()) for l in (l for l in status_lines if l.startswith('!')): svn(svn_repo, 'remove', l[1:].strip()) |