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

Unified Diff: git_cl.py

Issue 1878613003: Fix git cl checkout when no branch has issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: actual fix Created 4 years, 8 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 | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index ad6fe01a2e0e38437b724c5e4a0fbc8548a73fe7..4590e210899c994efeea85163fc4b025520803d8 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4550,10 +4550,10 @@ def CMDcheckout(parser, args):
target_issue = str(issue_arg.issue)
def find_issues(issueprefix):
- key_and_issues = [x.split() for x in RunGit(
- ['config', '--local', '--get-regexp', r'branch\..*\.%s' % issueprefix])
- .splitlines()]
- for key, issue in key_and_issues:
+ output = RunGit(['config', '--local', '--get-regexp',
+ r'branch\..*\.%s' % issueprefix],
+ error_ok=True)
+ for key, issue in [x.split() for x in output.splitlines()]:
if issue == target_issue:
yield re.sub(r'branch\.(.*)\.%s' % issueprefix, r'\1', key)
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698