OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 22 matching lines...) Expand all Loading... |
33 import sys | 33 import sys |
34 import urllib | 34 import urllib |
35 | 35 |
36 from common_includes import * | 36 from common_includes import * |
37 import push_to_trunk | 37 import push_to_trunk |
38 | 38 |
39 SETTINGS_LOCATION = "SETTINGS_LOCATION" | 39 SETTINGS_LOCATION = "SETTINGS_LOCATION" |
40 | 40 |
41 CONFIG = { | 41 CONFIG = { |
42 PERSISTFILE_BASENAME: "/tmp/v8-auto-push-tempfile", | 42 PERSISTFILE_BASENAME: "/tmp/v8-auto-push-tempfile", |
43 DOT_GIT_LOCATION: ".git", | |
44 SETTINGS_LOCATION: "~/.auto-roll", | 43 SETTINGS_LOCATION: "~/.auto-roll", |
45 } | 44 } |
46 | 45 |
47 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$") | 46 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$") |
48 | 47 |
49 | 48 |
50 class Preparation(Step): | 49 class Preparation(Step): |
51 MESSAGE = "Preparation." | 50 MESSAGE = "Preparation." |
52 | 51 |
53 def RunStep(self): | 52 def RunStep(self): |
54 self.InitialEnvironmentChecks() | 53 self.InitialEnvironmentChecks(self.default_cwd) |
55 self.CommonPrepare() | 54 self.CommonPrepare() |
56 | 55 |
57 | 56 |
58 class CheckAutoPushSettings(Step): | 57 class CheckAutoPushSettings(Step): |
59 MESSAGE = "Checking settings file." | 58 MESSAGE = "Checking settings file." |
60 | 59 |
61 def RunStep(self): | 60 def RunStep(self): |
62 settings_file = os.path.realpath(self.Config(SETTINGS_LOCATION)) | 61 settings_file = os.path.realpath(self.Config(SETTINGS_LOCATION)) |
63 if os.path.exists(settings_file): | 62 if os.path.exists(settings_file): |
64 settings_dict = json.loads(FileToText(settings_file)) | 63 settings_dict = json.loads(FileToText(settings_file)) |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 CheckAutoPushSettings, | 146 CheckAutoPushSettings, |
148 CheckTreeStatus, | 147 CheckTreeStatus, |
149 FetchLKGR, | 148 FetchLKGR, |
150 CheckLastPush, | 149 CheckLastPush, |
151 PushToTrunk, | 150 PushToTrunk, |
152 ] | 151 ] |
153 | 152 |
154 | 153 |
155 if __name__ == "__main__": # pragma: no cover | 154 if __name__ == "__main__": # pragma: no cover |
156 sys.exit(AutoPush(CONFIG).Run()) | 155 sys.exit(AutoPush(CONFIG).Run()) |
OLD | NEW |