From db818dbd5232a36ffe2e127a53efdf00eaeb2309 Mon Sep 17 00:00:00 2001 From: machenbach Date: Fri, 28 Nov 2014 00:11:35 -0800 Subject: [PATCH] Fix candidate lookup in auto push script. 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 | 2 +- tools/push-to-trunk/test_scripts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/push-to-trunk/auto_push.py b/tools/push-to-trunk/auto_push.py index 68fba55..34afa4a 100755 --- a/tools/push-to-trunk/auto_push.py +++ b/tools/push-to-trunk/auto_push.py @@ -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): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index b5ec371..db702a3 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -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"), -- 2.7.4