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

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

Issue 1381753003: [GN]: Fix typo in roll_deps.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge in dirk's patch 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/gn/bin/roll_gn.py
diff --git a/tools/gn/bin/roll_gn.py b/tools/gn/bin/roll_gn.py
index 1e9dec9e79d594fa0c6410dad55fe602e5cf5680..b5c276ecc8ee5b6394d2d83b5513f49fdc45fc10 100644
--- a/tools/gn/bin/roll_gn.py
+++ b/tools/gn/bin/roll_gn.py
@@ -199,7 +199,7 @@ class GNRoller(object):
# Close the build CL and move off of the build branch back to whatever
# we were on before.
self.Call('git-cl set-close')
- self.MovetoLastHead()
+ self.MoveToLastHead()
return ret
@@ -375,9 +375,12 @@ class GNRoller(object):
return 0
- def MovetoLastHead(self):
- _, out, _ = self.Call('git reflog -1')
- m = re.match('moving from ([^\s]+)', out)
+ def MoveToLastHead(self):
+ # When this is called, there will be a commit + a checkout as
+ # the two most recent entries in the reflog, assuming nothing as
+ # modified the repo while this script has been running.
+ _, out, _ = self.Call('git reflog -2')
+ m = re.search('moving from ([^\s]+)', out)
last_head = m.group(1)
self.Call('git checkout %s' % last_head)
« 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