Index: hgreview.py |
=================================================================== |
--- a/hgreview.py |
+++ b/hgreview.py |
@@ -58,15 +58,19 @@ |
if not opts.get('issue'): |
# New issue, make sure title and message are set |
- if not opts.get('title') and opts.get('change'): |
- opts['title'] = repo[opts['change']].description() |
- if not opts.get('title'): |
+ fulltitle = None |
+ |
+ if not opts.get('title') and not opts.get('change'): |
opts['title'] = ui.prompt('New review title: ', '') |
+ elif not opts.get('title') and opts.get('change'): |
Wladimir Palant
2017/07/18 12:06:02
Nit: `and opts.get('change')` is unnecessary here.
f.nicolaisen
2017/07/18 12:17:57
How? It could be that the submitter wants the prom
Wladimir Palant
2017/07/18 12:27:18
No, we would get into the prompt case then. And si
f.nicolaisen
2017/07/18 13:46:39
Acknowledged.
|
+ fulltitle = repo[opts['change']].description() |
+ 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') |