| Index: tools/autoroller/roll_chromium_revision.py
|
| diff --git a/tools/autoroller/roll_chromium_revision.py b/tools/autoroller/roll_chromium_revision.py
|
| index e906809624e9bf6591711522f10ff034b168b992..4f2de2f7e9c30c5624139536125f845073a24326 100755
|
| --- a/tools/autoroller/roll_chromium_revision.py
|
| +++ b/tools/autoroller/roll_chromium_revision.py
|
| @@ -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])
|
|
|