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

Bot Update: Always pass in --revision <solution>@unmanaged

Gclient sometimes ignores "unmanaged": "False" in the gclient solution
if --revision <anything> is passed.  This forces gclient to always
treat solutions deps as unmanaged.

BUG=693296

Change-Id: I91d5f4c9377fab0fde23cf15d1475779978820fa
Reviewed-on: https://chromium-review.googlesource.com/444098
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
parent 2362871c
......@@ -807,6 +807,11 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
gc_revisions = {
dirname: rev for dirname, rev in revisions.iteritems()
if dirname not in solution_dirs}
# Gclient sometimes ignores "unmanaged": "False" in the gclient solution
# if --revision <anything> is passed (for example, for subrepos).
# This forces gclient to always treat solutions deps as unmanaged.
for solution_name in list(solution_dirs):
gc_revisions[solution_name] = 'unmanaged'
# Let gclient do the DEPS syncing.
# The branch-head refspec is a special case because its possible Chrome
# src, which contains the branch-head refspecs, is DEPSed in.
......
......@@ -213,10 +213,10 @@ class BotUpdateUnittests(unittest.TestCase):
idx_first_revision = args.index('--revision')
idx_second_revision = args.index(
'--revision', idx_first_revision+1)
with self.assertRaises(ValueError):
args.index('--revision', idx_second_revision+1)
self.assertEquals(args[idx_first_revision+1], 'src@origin/master')
self.assertEquals(args[idx_second_revision+1], 'src/v8@deadbeef')
idx_third_revision = args.index('--revision', idx_second_revision+1)
self.assertEquals(args[idx_first_revision+1], 'somename@unmanaged')
self.assertEquals(args[idx_second_revision+1], 'src@origin/master')
self.assertEquals(args[idx_third_revision+1], 'src/v8@deadbeef')
return self.call.records
def testBreakLocks(self):
......
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