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

Unified Diff: git_cl.py

Issue 2250323003: Add --issue flag to git cl status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Changelist has fancy logic in __init__, so override issue after the fact. Created 4 years, 4 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
diff --git a/git_cl.py b/git_cl.py
index 6658a2fa05aaf149ac417453e4643cf1e6a9b1f4..2df691d047548f4788c9a91d8a7e1ceb93bd2a12 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3278,6 +3278,9 @@ def CMDstatus(parser, args):
help='print only specific field (desc|id|patch|status|url)')
parser.add_option('-f', '--fast', action='store_true',
help='Do not retrieve review status')
+ parser.add_option('-i', '--issue', type=int,
+ help='Operate on this issue number instead of the current'
+ ' branch\'s implicit issue. Only valid with --field.')
parser.add_option(
'-j', '--maxjobs', action='store', type=int,
help='The maximum number of jobs to use when retrieving review status')
@@ -3288,8 +3291,13 @@ def CMDstatus(parser, args):
parser.error('Unsupported args: %s' % args)
auth_config = auth.extract_auth_config_from_options(options)
+ if not options.field and options.issue is not None:
Vadim Sh. 2016/08/17 19:39:38 Is it None or 0? Option type is 'int', I forgot wh
+ parser.error('--issue may only be specified in conjunction with --field')
+
if options.field:
cl = Changelist(auth_config=auth_config)
tandrii(chromium) 2016/08/17 19:41:04 passing it here is also OK, so long as you know wh
+ if options.issue:
+ cl.issue = options.issue
if options.field.startswith('desc'):
print(cl.GetDescription())
elif options.field == 'id':
« 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