diff options
Diffstat (limited to 'deps/v8/tools/push-to-trunk/auto_push.py')
-rwxr-xr-x | deps/v8/tools/push-to-trunk/auto_push.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/deps/v8/tools/push-to-trunk/auto_push.py b/deps/v8/tools/push-to-trunk/auto_push.py index aeaea805b1..fef3b5367b 100755 --- a/deps/v8/tools/push-to-trunk/auto_push.py +++ b/deps/v8/tools/push-to-trunk/auto_push.py @@ -36,22 +36,13 @@ import urllib from common_includes import * import push_to_trunk -SETTINGS_LOCATION = "SETTINGS_LOCATION" - -CONFIG = { - PERSISTFILE_BASENAME: "/tmp/v8-auto-push-tempfile", - DOT_GIT_LOCATION: ".git", - SETTINGS_LOCATION: "~/.auto-roll", -} - PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$") - class Preparation(Step): MESSAGE = "Preparation." def RunStep(self): - self.InitialEnvironmentChecks() + self.InitialEnvironmentChecks(self.default_cwd) self.CommonPrepare() @@ -59,7 +50,7 @@ class CheckAutoPushSettings(Step): MESSAGE = "Checking settings file." def RunStep(self): - settings_file = os.path.realpath(self.Config(SETTINGS_LOCATION)) + settings_file = os.path.realpath(self.Config("SETTINGS_LOCATION")) if os.path.exists(settings_file): settings_dict = json.loads(FileToText(settings_file)) if settings_dict.get("enable_auto_roll") is False: @@ -119,9 +110,8 @@ class PushToTrunk(Step): # TODO(machenbach): Update the script before calling it. if self._options.push: - P = push_to_trunk.PushToTrunk self._side_effect_handler.Call( - P(push_to_trunk.CONFIG, self._side_effect_handler).Run, + push_to_trunk.PushToTrunk().Run, ["--author", self._options.author, "--reviewer", self._options.reviewer, "--revision", self["lkgr"], @@ -141,6 +131,12 @@ class AutoPush(ScriptsBase): options.requires_editor = False return True + def _Config(self): + return { + "PERSISTFILE_BASENAME": "/tmp/v8-auto-push-tempfile", + "SETTINGS_LOCATION": "~/.auto-roll", + } + def _Steps(self): return [ Preparation, @@ -153,4 +149,4 @@ class AutoPush(ScriptsBase): if __name__ == "__main__": # pragma: no cover - sys.exit(AutoPush(CONFIG).Run()) + sys.exit(AutoPush().Run()) |