Index: hgreview.py |
=================================================================== |
--- a/hgreview.py |
+++ b/hgreview.py |
@@ -58,15 +58,20 @@ |
if not opts.get('issue'): |
# New issue, make sure title and message are set |
+ fulltitle = None |
+ |
+ if opts.get('change'): |
+ fulltitle = repo[opts['change']].description() |
+ else: |
+ fulltitle = ui.prompt('New review title: ', '') |
Wladimir Palant
2017/07/17 14:57:52
So we will be prompting even if --title is given o
f.nicolaisen
2017/07/18 11:52:00
Acknowledged.
|
if not opts.get('title') and opts.get('change'): |
- opts['title'] = repo[opts['change']].description() |
- if not opts.get('title'): |
- opts['title'] = ui.prompt('New review title: ', '') |
+ fulltitle = repo[opts['change']].description() |
Wladimir Palant
2017/07/17 14:57:52
Overwriting fulltitle variable with the same value
f.nicolaisen
2017/07/18 11:52:00
Acknowledged.
|
+ opts['title'] = fulltitle.rstrip().split('\n')[0] |
if not opts['title'].strip(): |
raise error.Abort('No review title given.') |
if not opts.get('message'): |
- opts['message'] = opts['title'] |
+ opts['message'] = fulltitle or opts['title'] |
path = (ui.config('paths', 'default-push') |
or ui.config('paths', 'default') |