[PATCH] D59161: [git-llvm] Only use --force-interactive when supported
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 15:29:49 PST 2019
smeenai created this revision.
smeenai added reviewers: jyknight, mehdi_amini.
Herald added a project: LLVM.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59161
Files:
llvm/utils/git-svn/git-llvm
Index: llvm/utils/git-svn/git-llvm
===================================================================
--- llvm/utils/git-svn/git-llvm
+++ llvm/utils/git-svn/git-llvm
@@ -345,7 +345,10 @@
# 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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59161.189952.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190308/c3918389/attachment.bin>
More information about the llvm-commits
mailing list