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

Unified Diff: git_cl.py

Issue 2307463002: git_cl: Enable updating description from local. (Closed)
Patch Set: git_cl: Enable updating description from local. Created 4 years, 3 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 a1f58c8561f8129afd9cab9cf3de775fd5864d87..b8f688cfbfb23c17c7340608daa95a037b21663d 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3580,7 +3580,8 @@ def CMDdescription(parser, args):
parser.add_option('-d', '--display', action='store_true',
help='Display the description instead of opening an editor')
parser.add_option('-n', '--new-description',
- help='New description to set for this issue (- for stdin)')
+ help='New description to set for this issue (- for stdin, '
+ '+ to load from local commit HEAD)')
_add_codereview_select_options(parser)
auth.add_auth_options(parser)
@@ -3619,6 +3620,10 @@ def CMDdescription(parser, args):
text = options.new_description
if text == '-':
text = '\n'.join(l.rstrip() for l in sys.stdin)
+ elif text == '+':
+ base_branch = cl.GetCommonAncestorWithUpstream()
+ merge_base = RunGit(['merge-base', base_branch, 'HEAD']).strip()
+ text = CreateDescriptionFromLog([merge_base])
agable 2016/09/02 16:43:00 This produces a commit message which is not of the
dnj 2016/09/02 17:31:40 I don't think this is correct. When I run the comm
agable 2016/09/02 17:43:39 Ah. We develop differently. I often have 2-10 comm
dnj 2016/09/02 18:05:55 I revised this to do the same thing "git cl upload
description.set_description(text)
else:
« 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