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

Unified Diff: git_cl.py

Issue 1237483003: Add --display option to git cl description (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 5 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 28f99fad46fedb07fff7f23fbe602f957f03dee3..e46b66097520ee24b77202dac0c2c6b818f66406 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1816,6 +1816,8 @@ def CMDcomments(parser, args):
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')
auth.add_auth_options(parser)
options, _ = parser.parse_args(args)
auth_config = auth.extract_auth_config_from_options(options)
@@ -1823,6 +1825,9 @@ def CMDdescription(parser, args):
if not cl.GetIssue():
DieWithError('This branch has no associated changelist.')
description = ChangeDescription(cl.GetDescription())
+ if options.display:
+ print description.description
+ return 0
description.prompt()
if cl.GetDescription() != description.description:
cl.UpdateDescription(description.description)
« 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