Commit 015fd3d9 authored by dbeam@chromium.org's avatar dbeam@chromium.org

Make git cl status spit out URLs instead of just Rietveld issue numbers.

R=maruel@chromium.org
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/17379008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@207048 0039d316-1c4b-4281-b951-d872f2087c98
parent 967c0a8f
......@@ -605,6 +605,8 @@ or verify this branch is set up to track another (via the --track argument to
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 @@ def CMDstatus(parser, args):
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment