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

Unified Diff: gclient_scm.py

Issue 930693002: gclient: Add '--auto_rebase' sync option. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Updated argument to have an underscore. Created 5 years, 10 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') | tests/gclient_scm_test.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 69dec5003aac8e649bd4e78660991fbce17c6b40..a73275572c22d835c0a783980a133b5b0296007c 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -592,15 +592,16 @@ class GitWrapper(SCMWrapper):
self.Print('_____ %s%s' % (self.relpath, rev_str), timestamp=False)
printed_path = True
while True:
- try:
- action = self._AskForData(
- 'Cannot %s, attempt to rebase? '
- '(y)es / (q)uit / (s)kip : ' %
- ('merge' if options.merge else 'fast-forward merge'),
- options)
- except ValueError:
- raise gclient_utils.Error('Invalid Character')
- if re.match(r'yes|y', action, re.I):
+ if not options.auto_rebase:
+ try:
+ action = self._AskForData(
+ 'Cannot %s, attempt to rebase? '
+ '(y)es / (q)uit / (s)kip : ' %
+ ('merge' if options.merge else 'fast-forward merge'),
+ options)
+ except ValueError:
+ raise gclient_utils.Error('Invalid Character')
+ if options.auto_rebase or re.match(r'yes|y', action, re.I):
self._AttemptRebase(upstream_branch, files, options,
printed_path=printed_path, merge=False)
printed_path = True
« no previous file with comments | « gclient.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698