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

Unified Diff: tools/gn/bin/roll_gn.py

Issue 1289233003: Fix various stray bugs in the GN auto-roller, and repair the DEPS file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update w/ review feedback Created 5 years, 4 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 | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/bin/roll_gn.py
diff --git a/tools/gn/bin/roll_gn.py b/tools/gn/bin/roll_gn.py
index 580904a9e07a743d7ac0e450da2613133844be7f..d71e209a61b0d0bbbf7aab49b49f3ad828e208d5 100644
--- a/tools/gn/bin/roll_gn.py
+++ b/tools/gn/bin/roll_gn.py
@@ -302,6 +302,10 @@ class GNRoller(object):
# Fetch the revision we just committed so that RollDEPS will find it.
self.Call('git fetch', cwd=self.buildtools_dir)
+ # Reset buildtools to the new commit so that we're not still on the
+ # merged branch.
+ self.Call('git checkout origin/master', cwd=self.buildtools_dir)
+
return 0
def RollDEPS(self):
@@ -322,7 +326,7 @@ class GNRoller(object):
m = re.match(".*'buildtools_revision':.*'(.+)',", l)
if m:
old_buildtools_commitish = m.group(1)
- new_deps_lines.append(" 'buildtools_revision': '%s'," %
+ new_deps_lines.append(" 'buildtools_revision': '%s',\n" %
new_buildtools_commitish)
else:
new_deps_lines.append(l)
@@ -344,6 +348,10 @@ class GNRoller(object):
self.Call('git-cl upload -f --send-mail --use-commit-queue')
finally:
os.remove(desc_file.name)
+
+ # Intentionally leave the src checkout on the new branch with the roll
+ # since we're not auto-committing it.
+
return 0
def GetBuildtoolsDesc(self):
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698