Commit d0e1d9d9 authored by Andrii Shyshkalov's avatar Andrii Shyshkalov

git cl status: re-use existing ChangeList object.

This way we avoid extra RPC to codereview site.

R=sergiyb@chromium.org
BUG=681704

Change-Id: I81f9ac1b8fe4cfaa95458a5669735168185c47e5
Reviewed-on: https://chromium-review.googlesource.com/430639
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
parent 258e0a65
...@@ -3821,10 +3821,13 @@ def CMDstatus(parser, args): ...@@ -3821,10 +3821,13 @@ def CMDstatus(parser, args):
alignment, ShortBranchName(branch), color, url, alignment, ShortBranchName(branch), color, url,
status_str, reset)) status_str, reset))
cl = Changelist(auth_config=auth_config)
branch = GetCurrentBranch()
print() print()
print('Current branch:',) print('Current branch: %s' % branch)
print(cl.GetBranch()) for cl in changes:
if cl.GetBranch() == branch:
break
if not cl.GetIssue(): if not cl.GetIssue():
print('No issue assigned.') print('No issue assigned.')
return 0 return 0
......
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