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

Unified Diff: tools/push-to-trunk/auto_roll.py

Issue 169843002: Retrieve bleeding edge push revision from trunk commit message. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add the same feature to auto-roll. Created 6 years, 10 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 | tools/push-to-trunk/push_to_trunk.py » ('j') | tools/push-to-trunk/push_to_trunk.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/auto_roll.py
diff --git a/tools/push-to-trunk/auto_roll.py b/tools/push-to-trunk/auto_roll.py
index 086f5a8abbe6ece3b7cc594717099959522b963c..971486d825a4bd6dab3f5a00f0a2ac4c2135bee1 100755
--- a/tools/push-to-trunk/auto_roll.py
+++ b/tools/push-to-trunk/auto_roll.py
@@ -105,17 +105,17 @@ class CheckLastPush(Step):
def RunStep(self):
self.RestoreIfUnset("latest")
- log = self.Git("svn log -1 --oneline ChangeLog").strip()
- match = re.match(r"^r(\d+) \| Prepare push to trunk", log)
- if match:
- latest = int(self._state["latest"])
- last_push = int(match.group(1))
- # TODO(machebach): This metric counts all revisions. It could be
- # improved by counting only the revisions on bleeding_edge.
- if latest - last_push < 10:
- # This makes sure the script doesn't push twice in a row when the cron
- # job retries several times.
- self.Die("Last push too recently: %d" % last_push)
+ push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based"
Jakob Kummerow 2014/02/19 12:44:49 Same s/*/+/ comment here... this looks like a cand
Michael Achenbach 2014/02/19 13:24:02 Extract method: Done. Regarding +: see the other c
+ args = "log -1 --format=%%H --grep=\"%s\" svn/trunk" % push_pattern
+ last_push_hash = self.Git(args).strip()
+ last_push = int(self.Git("svn find-rev %s" % last_push_hash).strip())
+
+ # TODO(machebach): This metric counts all revisions. It could be
Jakob Kummerow 2014/02/19 12:44:49 Who's machebach?
Michael Achenbach 2014/02/19 13:23:03 Done.
+ # improved by counting only the revisions on bleeding_edge.
+ if int(self._state["latest"]) - last_push < 10:
+ # This makes sure the script doesn't push twice in a row when the cron
+ # job retries several times.
+ self.Die("Last push too recently: %d" % last_push)
class FetchLKGR(Step):
« no previous file with comments | « no previous file | tools/push-to-trunk/push_to_trunk.py » ('j') | tools/push-to-trunk/push_to_trunk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698