Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/autoroller/roll_chromium_revision.py

Issue 1361923004: Autoroll: Update checkout before reading chromium_revision. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698