Commit 4dbec672 authored by Ryan Tseng's avatar Ryan Tseng Committed by Commit Bot

bot_update: Rewrite repo@HEAD to repo@origin/master

BUG=692140,664880

Change-Id: I3ddd899f1841930e601a906d658c5c78e2d76673
Reviewed-on: https://chromium-review.googlesource.com/442707Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
parent 2074a4b7
......@@ -354,6 +354,8 @@ def gclient_sync(with_branch_heads, shallow, revisions, break_repo_locks):
if break_repo_locks:
args += ['--break_repo_locks']
for name, revision in sorted(revisions.iteritems()):
if revision.upper() == 'HEAD':
revision = 'origin/master'
args.extend(['--revision', '%s@%s' % (name, revision)])
try:
......
......@@ -215,7 +215,7 @@ class BotUpdateUnittests(unittest.TestCase):
'--revision', idx_first_revision+1)
with self.assertRaises(ValueError):
args.index('--revision', idx_second_revision+1)
self.assertEquals(args[idx_first_revision+1], 'src@HEAD')
self.assertEquals(args[idx_first_revision+1], 'src@origin/master')
self.assertEquals(args[idx_second_revision+1], 'src/v8@deadbeef')
return self.call.records
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment