Autoroll: Update checkout before reading chromium_revision.
Ensure the checkout is updated _before_ reading the current revision from the DEPS file. This will avoid errors when a checkout is not up to date, as updating happened after reading the revision before this change. BUG=webrtc:4688 R=phoglund@webrtc.org Review URL: https://codereview.webrtc.org/1361923004 . Cr-Commit-Position: refs/heads/master@{#10071}
This commit is contained in:
parent
495d2fdd65
commit
44d5d7ba42
@ -297,7 +297,8 @@ def _IsTreeClean():
|
||||
logging.error('Dirty/unversioned files:\n%s', stdout)
|
||||
return False
|
||||
|
||||
def _CreateRollBranch(dry_run):
|
||||
|
||||
def _EnsureUpdatedMasterBranch(dry_run):
|
||||
current_branch = _RunCommand(
|
||||
['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
|
||||
if current_branch != 'master':
|
||||
@ -308,6 +309,9 @@ def _CreateRollBranch(dry_run):
|
||||
logging.info('Updating master branch...')
|
||||
if not dry_run:
|
||||
_RunCommand(['git', 'pull'])
|
||||
|
||||
|
||||
def _CreateRollBranch(dry_run):
|
||||
logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME)
|
||||
if not dry_run:
|
||||
_RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME])
|
||||
@ -372,6 +376,8 @@ def main():
|
||||
if opts.clean:
|
||||
_RemovePreviousRollBranch(opts.dry_run)
|
||||
|
||||
_EnsureUpdatedMasterBranch(opts.dry_run)
|
||||
|
||||
if not opts.revision:
|
||||
lkgr_contents = ReadUrlContent(CHROMIUM_LKGR_URL)
|
||||
logging.info('No revision specified. Using LKGR: %s', lkgr_contents[0])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user