Commit 3600164d authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

recipes: Specify refs/heads/master instead of origin/master for gclient config.

Bug: 1200657
Change-Id: I9362a66d12d75d26e1236f9d8516b03561fb9383
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2837689
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 447e0b72
......@@ -418,7 +418,7 @@ def gclient_sync(
args += ['--disable-syntax-validation']
for name, revision in sorted(revisions.items()):
if revision.upper() == 'HEAD':
revision = 'origin/master'
revision = 'refs/remotes/origin/master'
args.extend(['--revision', '%s@%s' % (name, revision)])
if patch_refs:
......
......@@ -314,11 +314,11 @@ def infra_internal(c): # pragma: no cover
@config_ctx(includes=['infra'])
def luci_gae(c):
# luci/gae is checked out as a part of infra.git solution at HEAD.
c.revisions['infra'] = 'origin/master'
c.revisions['infra'] = 'refs/heads/master'
# luci/gae is developed together with luci-go, which should be at HEAD.
c.revisions['infra/go/src/go.chromium.org/luci'] = 'origin/master'
c.revisions['infra/go/src/go.chromium.org/luci'] = 'refs/heads/master'
c.revisions['infra/go/src/go.chromium.org/gae'] = (
gclient_api.RevisionFallbackChain('origin/master'))
gclient_api.RevisionFallbackChain('refs/heads/master'))
m = c.got_revision_mapping
del m['infra']
m['infra/go/src/go.chromium.org/gae'] = 'got_revision'
......@@ -326,9 +326,9 @@ def luci_gae(c):
@config_ctx(includes=['infra'])
def luci_go(c):
# luci-go is checked out as a part of infra.git solution at HEAD.
c.revisions['infra'] = 'origin/master'
c.revisions['infra'] = 'refs/heads/master'
c.revisions['infra/go/src/go.chromium.org/luci'] = (
gclient_api.RevisionFallbackChain('origin/master'))
gclient_api.RevisionFallbackChain('refs/heads/master'))
m = c.got_revision_mapping
del m['infra']
m['infra/go/src/go.chromium.org/luci'] = 'got_revision'
......@@ -337,18 +337,18 @@ def luci_go(c):
def luci_py(c):
# luci-py is checked out as part of infra just to have appengine
# pre-installed, as that's what luci-py PRESUBMIT relies on.
c.revisions['infra'] = 'origin/master'
c.revisions['infra'] = 'refs/heads/master'
c.revisions['infra/luci'] = (
gclient_api.RevisionFallbackChain('origin/master'))
gclient_api.RevisionFallbackChain('refs/heads/master'))
m = c.got_revision_mapping
del m['infra']
m['infra/luci'] = 'got_revision'
@config_ctx(includes=['infra'])
def recipes_py(c):
c.revisions['infra'] = 'origin/master'
c.revisions['infra'] = 'refs/heads/master'
c.revisions['infra/recipes-py'] = (
gclient_api.RevisionFallbackChain('origin/master'))
gclient_api.RevisionFallbackChain('refs/heads/master'))
m = c.got_revision_mapping
del m['infra']
m['infra/recipes-py'] = 'got_revision'
......
......@@ -212,7 +212,8 @@ class BotUpdateUnittests(unittest.TestCase):
'--revision', idx_first_revision+1)
idx_third_revision = args.index('--revision', idx_second_revision+1)
self.assertEqual(args[idx_first_revision+1], 'somename@unmanaged')
self.assertEqual(args[idx_second_revision+1], 'src@origin/master')
self.assertEqual(
args[idx_second_revision+1], 'src@refs/remotes/origin/master')
self.assertEqual(args[idx_third_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