summaryrefslogtreecommitdiffstats
path: root/llvm/utils/git-svn/git-llvm
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2019-03-10 01:34:42 +0000
committerShoaib Meenai <smeenai@fb.com>2019-03-10 01:34:42 +0000
commite72381990e573d69afa25fd643e0f1e1ce9584e3 (patch)
tree609a872a65939ec5d8548e26a93c9a2818a424e1 /llvm/utils/git-svn/git-llvm
parent490975979bee1a75db06245ea62affc72912fb99 (diff)
downloadbcm5719-llvm-e72381990e573d69afa25fd643e0f1e1ce9584e3.tar.gz
bcm5719-llvm-e72381990e573d69afa25fd643e0f1e1ce9584e3.zip
[git-llvm] Only use --force-interactive when supported
The --force-interactive option was introduced in SVN 1.8, and trying to pass it to older SVN clients causes an error; CentOS 7 includes SVN 1.7, for example, so this makes `git llvm` not usable out of the box. Older clients would be interactive by default anyway [1], so just don't pass the option if it's not supported. An alternative would be to check the version instead of checking the help text, but I think directly detecting the presence of the option is more direct. [1] http://svn.apache.org/viewvc?view=revision&revision=1424037 Differential Revision: https://reviews.llvm.org/D59161 llvm-svn: 355782
Diffstat (limited to 'llvm/utils/git-svn/git-llvm')
-rwxr-xr-xllvm/utils/git-svn/git-llvm5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm
index 4b17aca6e95..c66787a1580 100755
--- a/llvm/utils/git-svn/git-llvm
+++ b/llvm/utils/git-svn/git-llvm
@@ -345,7 +345,10 @@ def svn_push_one_rev(svn_repo, rev, dry_run):
# Now we're ready to commit.
commit_msg = git('show', '--pretty=%B', '--quiet', rev)
if not dry_run:
- log(svn(svn_repo, 'commit', '-m', commit_msg, '--force-interactive'))
+ commit_args = ['commit', '-m', commit_msg]
+ if '--force-interactive' in svn(svn_repo, 'commit', '--help'):
+ commit_args.append('--force-interactive')
+ log(svn(svn_repo, *commit_args))
log('Committed %s to svn.' % rev)
else:
log("Would have committed %s to svn, if this weren't a dry run." % rev)
OpenPOWER on IntegriCloud