Fix autoroller main branch.

TBR=fbarchard@chromium.org
No-Try: True
Bug: libyuv:891
Change-Id: I33c31c2c675896ac936e216b246285052f74a51b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2854602
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
Mirko Bonadei 2021-04-28 17:32:14 +02:00 committed by libyuv LUCI CQ
parent 51c6d12e7d
commit eb6e7bb637

View File

@ -366,12 +366,12 @@ def _IsTreeClean():
def _EnsureUpdatedMasterBranch(dry_run):
current_branch = _RunCommand(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
if current_branch != 'master':
logging.error('Please checkout the master branch and re-run this script.')
if current_branch != 'main':
logging.error('Please checkout the main branch and re-run this script.')
if not dry_run:
sys.exit(-1)
logging.info('Updating master branch...')
logging.info('Updating main branch...')
_RunCommand(['git', 'pull'])
@ -384,7 +384,7 @@ def _CreateRollBranch(dry_run):
def _RemovePreviousRollBranch(dry_run):
active_branch, branches = _GetBranches()
if active_branch == ROLL_BRANCH_NAME:
active_branch = 'master'
active_branch = 'main'
if ROLL_BRANCH_NAME in branches:
logging.info('Removing previous roll branch (%s)', ROLL_BRANCH_NAME)
if not dry_run:
@ -444,7 +444,7 @@ def main():
'tryjobs.'))
p.add_argument('-i', '--ignore-unclean-workdir', action='store_true',
default=False,
help=('Ignore if the current branch is not master or if there '
help=('Ignore if the current branch is not main or if there '
'are uncommitted changes (default: %(default)s).'))
grp = p.add_mutually_exclusive_group()
grp.add_argument('--skip-cq', action='store_true', default=False,