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

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: add more asserts 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 | tests/git_cl_test.py » ('j') | 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..449b3ff2f80a040c4bdcf0bf4af188958a74569b 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3278,18 +3278,29 @@ 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')
auth.add_auth_options(parser)
+ _add_codereview_select_options(parser)
options, args = parser.parse_args(args)
+ _process_codereview_select_options(parser, options)
if args:
parser.error('Unsupported args: %s' % args)
auth_config = auth.extract_auth_config_from_options(options)
+ if options.issue is not None:
+ if not options.field or not options.forced_codereview:
+ parser.error('--issue may only be specified in conjunction with --field'
+ ' and either --rietveld or --gerrit')
+
if options.field:
- cl = Changelist(auth_config=auth_config)
+ cl = Changelist(auth_config=auth_config, issue=options.issue,
+ codereview=options.forced_codereview)
if options.field.startswith('desc'):
print(cl.GetDescription())
elif options.field == 'id':
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698