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

Unified Diff: gclient.py

Issue 4698006: Do not check the safesync_url at all if one or more --revision flags are... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
===================================================================
--- gclient.py (revision 61647)
+++ gclient.py (working copy)
@@ -677,17 +677,18 @@
revision_overrides = {}
if self._options.head:
return revision_overrides
- for s in self.dependencies:
- if not s.safesync_url:
- continue
- handle = urllib.urlopen(s.safesync_url)
- rev = handle.read().strip()
- handle.close()
- if len(rev):
- self._options.revisions.append('%s@%s' % (s.name, rev))
+ # Do not check safesync_url if one or more --revision flag is specified.
if not self._options.revisions:
+ for s in self.dependencies:
+ if not s.safesync_url:
+ continue
+ handle = urllib.urlopen(s.safesync_url)
+ rev = handle.read().strip()
+ handle.close()
+ if len(rev):
+ self._options.revisions.append('%s@%s' % (s.name, rev))
+ if not self._options.revisions:
return revision_overrides
- # --revision will take over safesync_url.
solutions_names = [s.name for s in self.dependencies]
index = 0
for revision in self._options.revisions:
@@ -1022,7 +1023,8 @@
'format src@rev. The src@ part is optional and can be '
'skipped. -r can be used multiple times when .gclient '
'has multiple solutions configured and will work even '
- 'if the src@ part is skipped.')
+ 'if the src@ part is skipped. Note that specifying '
+ '--revision means your safesync_url gets ignored.')
parser.add_option('-H', '--head', action='store_true',
help='skips any safesync_urls specified in '
'configured solutions and sync to head instead')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698