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'): |
+ description = repo[opts['change']].description() |
+ else: |
+ description = ui.prompt('New review title: ', '') |
Wladimir Palant
2017/07/17 13:20:37
The variable description is being assigned but nev
f.nicolaisen
2017/07/17 13:43:41
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() |
+ opts['title'] = fulltitle.rstrip().split('\n')[0] |
Wladimir Palant
2017/07/17 13:20:37
So we are no longer asking for a title if neither
f.nicolaisen
2017/07/17 13:43:40
Acknowledged.
|
if not opts['title'].strip(): |
raise error.Abort('No review title given.') |
if not opts.get('message'): |
- opts['message'] = opts['title'] |
+ opts['message'] = opts['title'] if fulltitle is None else fulltitle |
Wladimir Palant
2017/07/17 13:20:37
How about:
opts['message'] = fulltitle or opts['t
f.nicolaisen
2017/07/17 13:43:40
Acknowledged.
|
path = (ui.config('paths', 'default-push') |
or ui.config('paths', 'default') |