Do not check the safesync_url at all if one or more --revision flags are

specified.

BUG=49625
TEST=tests\gclient_smoketest.py runs successfully


Review URL: http://codereview.chromium.org/4698006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@65620 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
joi@chromium.org 15 years ago
parent 0661727bdc
commit 792ea881c7

@ -677,6 +677,8 @@ solutions = [
revision_overrides = {} revision_overrides = {}
if self._options.head: if self._options.head:
return revision_overrides return revision_overrides
# Do not check safesync_url if one or more --revision flag is specified.
if not self._options.revisions:
for s in self.dependencies: for s in self.dependencies:
if not s.safesync_url: if not s.safesync_url:
continue continue
@ -687,7 +689,6 @@ solutions = [
self._options.revisions.append('%s@%s' % (s.name, rev)) self._options.revisions.append('%s@%s' % (s.name, rev))
if not self._options.revisions: if not self._options.revisions:
return revision_overrides return revision_overrides
# --revision will take over safesync_url.
solutions_names = [s.name for s in self.dependencies] solutions_names = [s.name for s in self.dependencies]
index = 0 index = 0
for revision in self._options.revisions: for revision in self._options.revisions:
@ -1037,7 +1038,8 @@ def CMDsync(parser, args):
'format src@rev. The src@ part is optional and can be ' 'format src@rev. The src@ part is optional and can be '
'skipped. -r can be used multiple times when .gclient ' 'skipped. -r can be used multiple times when .gclient '
'has multiple solutions configured and will work even ' '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', parser.add_option('-H', '--head', action='store_true',
help='skips any safesync_urls specified in ' help='skips any safesync_urls specified in '
'configured solutions and sync to head instead') 'configured solutions and sync to head instead')

Loading…
Cancel
Save