Fix git interface for merge script.
authormachenbach@chromium.org <machenbach@chromium.org>
Fri, 26 Sep 2014 08:39:03 +0000 (08:39 +0000)
committermachenbach@chromium.org <machenbach@chromium.org>
Fri, 26 Sep 2014 08:39:03 +0000 (08:39 +0000)
BUG=chromium:410721
LOG=n
TEST=script_test.py
R=tandrii@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

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

index 312bc24..7ea39f7 100644 (file)
@@ -371,6 +371,8 @@ class GitReadOnlyMixin(VCInterface):
     return "origin/candidates"
 
   def RemoteBranch(self, name):
+    if name in ["candidates", "master"]:
+      return "origin/%s" % name
     return "origin/branch-heads/%s" % name
 
 
index e9aa81e..f129891 100644 (file)
@@ -1203,7 +1203,7 @@ LOG=N
       Cmd("git status -s -b -uno", "## some_branch\n"),
       Cmd("git fetch", ""),
       Cmd("git branch", "  branch1\n* branch2\n"),
-      Cmd("git checkout -b %s origin/branch-heads/candidates" %
+      Cmd("git checkout -b %s origin/candidates" %
           TEST_CONFIG["BRANCHNAME"], ""),
       Cmd(("git log --format=%H --grep=\"Port r12345\" "
            "--reverse origin/master"),