From 6c2ba7d13c1a0f733fa993f3e5145ea795d356ce Mon Sep 17 00:00:00 2001 From: Henrik Kjellander Date: Fri, 2 Oct 2015 09:03:06 +0200 Subject: [PATCH] autoroller: Add TBR= field and always update the checkout Add a TBR= field to enable automated rolling. In some cases, add a committer to the field, for other rolls: leave it empty. Always run 'git pull', even if --dry-run is specified, as it is often used to just generate an updated commit message to update an existing CL with when updating it to match fixes in Chromium. BUG=webrtc:4688 R=phoglund@webrtc.org Review URL: https://codereview.webrtc.org/1369333010 . Cr-Commit-Position: refs/heads/master@{#10140} --- tools/autoroller/roll_chromium_revision.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/autoroller/roll_chromium_revision.py b/tools/autoroller/roll_chromium_revision.py index fceb1f32b7..9752275913 100755 --- a/tools/autoroller/roll_chromium_revision.py +++ b/tools/autoroller/roll_chromium_revision.py @@ -258,13 +258,17 @@ def GenerateCommitMessage(current_cr_rev, new_cr_rev, changed_deps_list, commit_msg = ['Roll chromium_revision %s (%s)' % (rev_interval, git_number_interval)] - + # TBR field will be empty unless in some custom cases, where some engineers + # are added. + tbr_authors = '' if changed_deps_list: commit_msg.append('\nRelevant changes:') for c in changed_deps_list: commit_msg.append('* %s: %s..%s' % (c.path, c.current_rev[0:7], c.new_rev[0:7])) + if 'libvpx' in c.path: + tbr_authors += 'marpan@webrtc.org, stefan@webrtc.org, ' change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS') commit_msg.append('Details: %s' % change_url) @@ -275,8 +279,10 @@ def GenerateCommitMessage(current_cr_rev, new_cr_rev, changed_deps_list, change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, CLANG_UPDATE_SCRIPT_URL_PATH) commit_msg.append('Details: %s' % change_url) + tbr_authors += 'pbos@webrtc.org' else: commit_msg.append('\nClang version was not updated in this roll.') + commit_msg.append('\nTBR=%s\n' % tbr_authors) return '\n'.join(commit_msg) @@ -306,8 +312,7 @@ def _EnsureUpdatedMasterBranch(dry_run): sys.exit(-1) logging.info('Updating master branch...') - if not dry_run: - _RunCommand(['git', 'pull']) + _RunCommand(['git', 'pull']) def _CreateRollBranch(dry_run):