| OLD | NEW | 
|---|
| 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 30 matching lines...) Expand all  Loading... | 
| 41 class DetectLastRoll(Step): | 41 class DetectLastRoll(Step): | 
| 42   MESSAGE = "Detect commit ID of the last Chromium roll." | 42   MESSAGE = "Detect commit ID of the last Chromium roll." | 
| 43 | 43 | 
| 44   def RunStep(self): | 44   def RunStep(self): | 
| 45     # The revision that should be rolled. Check for the latest of the most | 45     # The revision that should be rolled. Check for the latest of the most | 
| 46     # recent releases based on commit timestamp. | 46     # recent releases based on commit timestamp. | 
| 47     revisions = self.GetRecentReleases( | 47     revisions = self.GetRecentReleases( | 
| 48         max_age=self._options.max_age * DAY_IN_SECONDS) | 48         max_age=self._options.max_age * DAY_IN_SECONDS) | 
| 49     assert revisions, "Didn't find any recent release." | 49     assert revisions, "Didn't find any recent release." | 
| 50 | 50 | 
|  | 51     # Update Chromium checkout before DEPS check to fix possible race-condition | 
|  | 52     self.GitPull(cwd=self._options.chromium) | 
|  | 53 | 
| 51     # Interpret the DEPS file to retrieve the v8 revision. | 54     # Interpret the DEPS file to retrieve the v8 revision. | 
| 52     # TODO(machenbach): This should be part or the roll-deps api of | 55     # TODO(machenbach): This should be part or the roll-deps api of | 
| 53     # depot_tools. | 56     # depot_tools. | 
| 54     Var = lambda var: '%s' | 57     Var = lambda var: '%s' | 
| 55     exec(FileToText(os.path.join(self._options.chromium, "DEPS"))) | 58     exec(FileToText(os.path.join(self._options.chromium, "DEPS"))) | 
| 56 | 59 | 
| 57     # The revision rolled last. | 60     # The revision rolled last. | 
| 58     self["last_roll"] = vars['v8_revision'] | 61     self["last_roll"] = vars['v8_revision'] | 
| 59     last_version = self.GetVersionTag(self["last_roll"]) | 62     last_version = self.GetVersionTag(self["last_roll"]) | 
| 60     assert last_version, "The last rolled v8 revision is not tagged." | 63     assert last_version, "The last rolled v8 revision is not tagged." | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 126   def _Steps(self): | 129   def _Steps(self): | 
| 127     return [ | 130     return [ | 
| 128       CheckActiveRoll, | 131       CheckActiveRoll, | 
| 129       DetectLastRoll, | 132       DetectLastRoll, | 
| 130       RollChromium, | 133       RollChromium, | 
| 131     ] | 134     ] | 
| 132 | 135 | 
| 133 | 136 | 
| 134 if __name__ == "__main__":  # pragma: no cover | 137 if __name__ == "__main__":  # pragma: no cover | 
| 135   sys.exit(AutoRoll().Run()) | 138   sys.exit(AutoRoll().Run()) | 
| OLD | NEW | 
|---|