| 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 29 matching lines...) Expand all Loading... |
| 40 result = self.ReadURL(search_url, params, wait_plan=[5, 20]) | 40 result = self.ReadURL(search_url, params, wait_plan=[5, 20]) |
| 41 if self.ContainsChromiumRoll(json.loads(result)["results"]): | 41 if self.ContainsChromiumRoll(json.loads(result)["results"]): |
| 42 print "Stop due to existing Chromium roll." | 42 print "Stop due to existing Chromium roll." |
| 43 return True | 43 return True |
| 44 | 44 |
| 45 | 45 |
| 46 class DetectLastPush(Step): | 46 class DetectLastPush(Step): |
| 47 MESSAGE = "Detect commit ID of the last push to trunk." | 47 MESSAGE = "Detect commit ID of the last push to trunk." |
| 48 | 48 |
| 49 def RunStep(self): | 49 def RunStep(self): |
| 50 push_hash = self.FindLastTrunkPush() | 50 push_hash = self.FindLastTrunkPush(include_patches=True) |
| 51 self["last_push"] = self.GitSVNFindSVNRev(push_hash) | 51 self["last_push"] = self.GitSVNFindSVNRev(push_hash) |
| 52 | 52 |
| 53 | 53 |
| 54 class DetectLastRoll(Step): | 54 class DetectLastRoll(Step): |
| 55 MESSAGE = "Detect commit ID of the last Chromium roll." | 55 MESSAGE = "Detect commit ID of the last Chromium roll." |
| 56 | 56 |
| 57 def RunStep(self): | 57 def RunStep(self): |
| 58 # Interpret the DEPS file to retrieve the v8 revision. | 58 # Interpret the DEPS file to retrieve the v8 revision. |
| 59 Var = lambda var: '%s' | 59 Var = lambda var: '%s' |
| 60 exec(self.ReadURL(CR_DEPS_URL)) | 60 exec(self.ReadURL(CR_DEPS_URL)) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 return [ | 102 return [ |
| 103 CheckActiveRoll, | 103 CheckActiveRoll, |
| 104 DetectLastPush, | 104 DetectLastPush, |
| 105 DetectLastRoll, | 105 DetectLastRoll, |
| 106 RollChromium, | 106 RollChromium, |
| 107 ] | 107 ] |
| 108 | 108 |
| 109 | 109 |
| 110 if __name__ == "__main__": # pragma: no cover | 110 if __name__ == "__main__": # pragma: no cover |
| 111 sys.exit(AutoRoll(CONFIG).Run()) | 111 sys.exit(AutoRoll(CONFIG).Run()) |
| OLD | NEW |