Chromium Code Reviews| 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): |