summaryrefslogtreecommitdiff
path: root/deps/v8/tools/push-to-trunk/auto_push.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/push-to-trunk/auto_push.py')
-rwxr-xr-xdeps/v8/tools/push-to-trunk/auto_push.py42
1 files changed, 25 insertions, 17 deletions
diff --git a/deps/v8/tools/push-to-trunk/auto_push.py b/deps/v8/tools/push-to-trunk/auto_push.py
index fef3b5367b..b0f1b26635 100755
--- a/deps/v8/tools/push-to-trunk/auto_push.py
+++ b/deps/v8/tools/push-to-trunk/auto_push.py
@@ -36,7 +36,7 @@ import urllib
from common_includes import *
import push_to_trunk
-PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$")
+PUSH_MESSAGE_RE = re.compile(r".* \(based on ([a-fA-F0-9]+)\)$")
class Preparation(Step):
MESSAGE = "Preparation."
@@ -94,28 +94,36 @@ class CheckLastPush(Step):
self.Die("Could not retrieve bleeding edge revision for trunk push %s"
% last_push)
- # TODO(machenbach): This metric counts all revisions. It could be
- # improved by counting only the revisions on bleeding_edge.
- if int(self["lkgr"]) - int(last_push_be) < 10: # pragma: no cover
- # This makes sure the script doesn't push twice in a row when the cron
- # job retries several times.
- self.Die("Last push too recently: %s" % last_push_be)
+ if self["lkgr"] == last_push_be:
+ print "Already pushed current lkgr %s" % last_push_be
+ return True
-class PushToTrunk(Step):
- MESSAGE = "Pushing to trunk if specified."
+class PushToCandidates(Step):
+ MESSAGE = "Pushing to candidates if specified."
def RunStep(self):
- print "Pushing lkgr %s to trunk." % self["lkgr"]
+ print "Pushing lkgr %s to candidates." % self["lkgr"]
+
+ args = [
+ "--author", self._options.author,
+ "--reviewer", self._options.reviewer,
+ "--revision", self["lkgr"],
+ "--force",
+ ]
+
+ if self._options.svn:
+ args.extend(["--svn", self._options.svn])
+ if self._options.svn_config:
+ args.extend(["--svn-config", self._options.svn_config])
+ if self._options.vc_interface:
+ args.extend(["--vc-interface", self._options.vc_interface])
+ if self._options.work_dir:
+ args.extend(["--work-dir", self._options.work_dir])
# TODO(machenbach): Update the script before calling it.
if self._options.push:
- self._side_effect_handler.Call(
- push_to_trunk.PushToTrunk().Run,
- ["--author", self._options.author,
- "--reviewer", self._options.reviewer,
- "--revision", self["lkgr"],
- "--force"])
+ self._side_effect_handler.Call(push_to_trunk.PushToTrunk().Run, args)
class AutoPush(ScriptsBase):
@@ -144,7 +152,7 @@ class AutoPush(ScriptsBase):
CheckTreeStatus,
FetchLKGR,
CheckLastPush,
- PushToTrunk,
+ PushToCandidates,
]