Fix candidate lookup in auto push script.
authormachenbach <machenbach@chromium.org>
Fri, 28 Nov 2014 08:11:35 +0000 (00:11 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 28 Nov 2014 08:11:42 +0000 (08:11 +0000)
NOTRY=true
BUG=chromium:431669
LOG=n
TBR=jkummerow@chromium.org
TEST=./script_test.py

Review URL: https://codereview.chromium.org/765943002

Cr-Commit-Position: refs/heads/master@{#25558}

tools/push-to-trunk/auto_push.py
tools/push-to-trunk/test_scripts.py

index 68fba55..34afa4a 100755 (executable)
@@ -75,7 +75,7 @@ class FetchCandidate(Step):
 
   def RunStep(self):
     self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate")
-    self["candidate"] = self.Git("show-ref -s refs/heads/candidate")
+    self["candidate"] = self.Git("show-ref -s refs/heads/candidate").strip()
 
 
 class CheckLastPush(Step):
index b5ec371..db702a3 100644 (file)
@@ -956,7 +956,7 @@ def get_list():
       URL("https://v8-status.appspot.com/current?format=json",
           "{\"message\": \"Tree is throttled\"}"),
       Cmd("git fetch origin +refs/heads/candidate:refs/heads/candidate", ""),
-      Cmd("git show-ref -s refs/heads/candidate", "abc123"),
+      Cmd("git show-ref -s refs/heads/candidate", "abc123\n"),
       Cmd(("git log -1 --format=%H --grep=\""
            "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
            " origin/candidates"), "push_hash\n"),