Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: tools/release/common_includes.py

Issue 933523003: Fix branch test for merge script. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/common_includes.py
diff --git a/tools/release/common_includes.py b/tools/release/common_includes.py
index 03b0c5b7d49fc3fe9d4149523e5da2b4af5c86af..bae05bc6b542a2c41d4bb9773bc8ecfc3fc97068 100644
--- a/tools/release/common_includes.py
+++ b/tools/release/common_includes.py
@@ -338,12 +338,18 @@ class GitInterface(VCInterface):
return name
if name in ["candidates", "master"]:
return "refs/remotes/origin/%s" % name
- # Check if branch is in heads.
- if self.step.Git("show-ref refs/remotes/origin/%s" % name).strip():
- return "refs/remotes/origin/%s" % name
- # Check if branch is in branch-heads.
- if self.step.Git("show-ref refs/remotes/branch-heads/%s" % name).strip():
- return "refs/remotes/branch-heads/%s" % name
+ try:
+ # Check if branch is in heads.
+ if self.step.Git("show-ref refs/remotes/origin/%s" % name).strip():
+ return "refs/remotes/origin/%s" % name
+ except GitFailedException:
+ pass
+ try:
+ # Check if branch is in branch-heads.
+ if self.step.Git("show-ref refs/remotes/branch-heads/%s" % name).strip():
+ return "refs/remotes/branch-heads/%s" % name
+ except GitFailedException:
+ pass
self.Die("Can't find remote of %s" % name)
def Tag(self, tag, remote, message):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698