[llvm] r355782 - [git-llvm] Only use --force-interactive when supported
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 9 17:34:42 PST 2019
Author: smeenai
Date: Sat Mar 9 17:34:42 2019
New Revision: 355782
URL: http://llvm.org/viewvc/llvm-project?rev=355782&view=rev
Log:
[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
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=355782&r1=355781&r2=355782&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-llvm (original)
+++ llvm/trunk/utils/git-svn/git-llvm Sat Mar 9 17:34:42 2019
@@ -345,7 +345,10 @@ def svn_push_one_rev(svn_repo, rev, dry_
# 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)
More information about the llvm-commits
mailing list