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

Side by Side Diff: tools/release/auto_roll.py

Issue 979133002: Fix progress check in auto-roller. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/release/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import json 7 import json
8 import os 8 import os
9 import sys 9 import sys
10 import urllib 10 import urllib
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 assert revisions, "Didn't find any recent release." 49 assert revisions, "Didn't find any recent release."
50 50
51 # Interpret the DEPS file to retrieve the v8 revision. 51 # Interpret the DEPS file to retrieve the v8 revision.
52 # TODO(machenbach): This should be part or the roll-deps api of 52 # TODO(machenbach): This should be part or the roll-deps api of
53 # depot_tools. 53 # depot_tools.
54 Var = lambda var: '%s' 54 Var = lambda var: '%s'
55 exec(FileToText(os.path.join(self._options.chromium, "DEPS"))) 55 exec(FileToText(os.path.join(self._options.chromium, "DEPS")))
56 56
57 # The revision rolled last. 57 # The revision rolled last.
58 self["last_roll"] = vars['v8_revision'] 58 self["last_roll"] = vars['v8_revision']
59 last_version = self.GetVersionTag(self["last_roll"])
60 assert last_version, "The last rolled v8 revision is not tagged."
59 61
60 # There must be some progress between the last roll and the new candidate 62 # There must be some progress between the last roll and the new candidate
61 # revision (i.e. we don't go backwards). The revisions are ordered newest 63 # revision (i.e. we don't go backwards). The revisions are ordered newest
62 # to oldest. It is possible that the newest timestamp has no progress 64 # to oldest. It is possible that the newest timestamp has no progress
63 # compared to the last roll, i.e. if the newest release is a cherry-pick 65 # compared to the last roll, i.e. if the newest release is a cherry-pick
64 # on a release branch. Then we look further. 66 # on a release branch. Then we look further.
65 for revision in revisions: 67 for revision in revisions:
66 commits = self.GitLog( 68 version = self.GetVersionTag(revision)
67 format="%H", git_hash="%s..%s" % (self["last_roll"], revision)) 69 assert version, "Internal error. All recent releases should have a tag"
68 if commits: 70
71 if SortingKey(last_version) < SortingKey(version):
69 self["roll"] = revision 72 self["roll"] = revision
70 break 73 break
71 else: 74 else:
72 print("There is no newer v8 revision than the one in Chromium (%s)." 75 print("There is no newer v8 revision than the one in Chromium (%s)."
73 % self["last_roll"]) 76 % self["last_roll"])
74 return True 77 return True
75 78
76 79
77 class RollChromium(Step): 80 class RollChromium(Step):
78 MESSAGE = "Roll V8 into Chromium." 81 MESSAGE = "Roll V8 into Chromium."
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 def _Steps(self): 126 def _Steps(self):
124 return [ 127 return [
125 CheckActiveRoll, 128 CheckActiveRoll,
126 DetectLastRoll, 129 DetectLastRoll,
127 RollChromium, 130 RollChromium,
128 ] 131 ]
129 132
130 133
131 if __name__ == "__main__": # pragma: no cover 134 if __name__ == "__main__": # pragma: no cover
132 sys.exit(AutoRoll().Run()) 135 sys.exit(AutoRoll().Run())
OLDNEW
« no previous file with comments | « no previous file | tools/release/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698