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': |