Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index 870996587b3e1d0992c51e9a1155ec04fc25ebe9..7363d8f3a6fc0efcdd102175364805393fb9e8bb 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -3257,19 +3257,36 @@ def CMDcomments(parser, args): |
| return 0 |
| +@subcommand.usage('[codereview url or issue id]') |
| def CMDdescription(parser, args): |
| """Brings up the editor for the current CL's description.""" |
| parser.add_option('-d', '--display', action='store_true', |
| help='Display the description instead of opening an editor') |
| + |
| + _add_codereview_select_options(parser) |
| auth.add_auth_options(parser) |
| - options, _ = parser.parse_args(args) |
| + options, args = parser.parse_args(args) |
| + _process_codereview_select_options(parser, options) |
| + |
| + target_issue = None |
| + if len(args) > 0: |
| + issue_arg = ParseIssueNumberArgument(args[0]) |
| + if not issue_arg.valid: |
| + parser.print_help() |
| + return 1 |
| + target_issue = issue_arg.issue |
| + |
| auth_config = auth.extract_auth_config_from_options(options) |
| - cl = Changelist(auth_config=auth_config) |
| + |
| + cl = Changelist( |
| + auth_config=auth_config, issue=target_issue, |
| + codereview=options.forced_codereview) |
| + |
| if not cl.GetIssue(): |
| DieWithError('This branch has no associated changelist.') |
| description = ChangeDescription(cl.GetDescription()) |
| if options.display: |
| - print description.description |
| + print >> sys.stdout, description.description |
|
tandrii(chromium)
2016/04/26 10:34:20
well, but print always goes to sys.stdout, so i fi
|
| return 0 |
| description.prompt() |
| if cl.GetDescription() != description.description: |