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

Unified Diff: git_cl.py

Issue 17379008: Make git cl status spit out URLs instead of just Rietveld issue numbers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 7 years, 6 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: git_cl.py
===================================================================
--- git_cl.py (revision 207032)
+++ git_cl.py (working copy)
@@ -605,6 +605,8 @@
def GetIssueURL(self):
"""Get the URL for a particular issue."""
+ if not self.GetIssue():
+ return None
return '%s/%s' % (self.GetRietveldServer(), self.GetIssue())
def GetDescription(self, pretty=False):
@@ -1047,12 +1049,12 @@
if show_branches:
branches = RunGit(['for-each-ref', '--format=%(refname)', 'refs/heads'])
if branches:
- print 'Branches associated with reviews:'
changes = (Changelist(branchref=b) for b in branches.splitlines())
- branches = dict((cl.GetBranch(), cl.GetIssue()) for cl in changes)
+ branches = dict((cl.GetBranch(), cl.GetIssueURL()) for cl in changes)
alignment = max(5, max(len(b) for b in branches))
+ print 'Branches associated with reviews:'
for branch in sorted(branches):
- print " %*s: %s" % (alignment, branch, branches[branch])
+ print " %*s: %s" % (alignment, branch, branches[branch] or '')
cl = Changelist()
if options.field:
« 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