Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: gclient_scm.py

Issue 8227036: Reapply r104938 "Make svn update not prompt during a sync." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient.py ('k') | scm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 95890a450ce8eb5e79bcd110001508ecec51eac7..c33793c7db4da6cb795d5f53d9466913f03957f8 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -994,8 +994,24 @@ class SVNWrapper(SCMWrapper):
new_command = command[:]
if revision:
new_command.extend(['--revision', str(revision).strip()])
+ # We don't want interaction when jobs are used.
+ if options.jobs > 1:
+ new_command.append('--non-interactive')
# --force was added to 'svn update' in svn 1.5.
- if ((options.force or options.manually_grab_svn_rev) and
- scm.SVN.AssertVersion("1.5")[0]):
+ # --accept was added to 'svn update' in svn 1.6.
+ if not scm.SVN.AssertVersion('1.5')[0]:
+ return new_command
+
+ # It's annoying to have it block in the middle of a sync, just sensible
+ # defaults.
+ if options.force:
+ new_command.append('--force')
+ if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
+ new_command.extend(('--accept', 'theirs-conflict'))
+ elif options.manually_grab_svn_rev:
new_command.append('--force')
+ if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
+ new_command.extend(('--accept', 'postpone'))
+ elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
+ new_command.extend(('--accept', 'postpone'))
return new_command
« no previous file with comments | « gclient.py ('k') | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698