Reviewers: tandrii(chromium), Hablich,

Message:
PTAL

Description:
Make auto-pusher more robust.

The auto-push script is only used in an automated fashion
on bots. It doesn't need to check for a clean git
environment as it has a special workdir checkout.

If the release creation fails for whatever reason (e.g.
a master restart happens in the middle), the workdir
checkout might be left dirty. Any new attempt of the auto
pusher then bails out.

After this change it will call the create_release script
in any case which tidies up the workspace on startup.

[email protected]
NOTRY=true
TEST=./script_test.py

Please review this at https://codereview.chromium.org/960773007/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -6 lines):
  M tools/release/auto_push.py
  M tools/release/test_scripts.py


Index: tools/release/auto_push.py
diff --git a/tools/release/auto_push.py b/tools/release/auto_push.py
index a876d7378ba500253dac649a60669fae162f9206..aba5cba72a717625c4d6f58ddc45f66efe730c43 100755
--- a/tools/release/auto_push.py
+++ b/tools/release/auto_push.py
@@ -41,8 +41,8 @@ class Preparation(Step):
   MESSAGE = "Preparation."

   def RunStep(self):
-    self.InitialEnvironmentChecks(self.default_cwd)
-    self.CommonPrepare()
+    # Fetch unfetched revisions.
+    self.vc.Fetch()


 class FetchCandidate(Step):
Index: tools/release/test_scripts.py
diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py
index 6fc306550543de515b2d48f93ebafd70e0492c01..fb495d1667eba206125883e473f1ccae56a78152 100644
--- a/tools/release/test_scripts.py
+++ b/tools/release/test_scripts.py
@@ -1072,11 +1072,7 @@ [email protected],[email protected]"""
         auto_push.AutoPush, LastReleaseBailout, AUTO_PUSH_ARGS))

   def testAutoPush(self):
-    TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
-
     self.Expect([
-      Cmd("git status -s -uno", ""),
-      Cmd("git status -s -b -uno", "## some_branch\n"),
       Cmd("git fetch", ""),
       Cmd("git fetch origin +refs/heads/roll:refs/heads/roll", ""),
       Cmd("git show-ref -s refs/heads/roll", "abc123\n"),


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to