Index: hgreview.py |
=================================================================== |
--- a/hgreview.py |
+++ b/hgreview.py |
@@ -58,15 +58,18 @@ |
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 opts.get('change'): |
+ description = repo[opts['change']].description() |
+ else: |
+ description = ui.prompt('New review title: ', '') |
Wladimir Palant
2017/01/16 10:11:43
The logic change here will have the effect that th
Vasily Kuznetsov
2017/01/16 10:46:07
Yes, that's right. I also missed this case when su
Wladimir Palant
2017/01/16 21:50:50
This isn't the right thing to do either. We should
Vasily Kuznetsov
2017/01/16 22:39:05
My thinking was that it's quite unlikely that some
Wladimir Palant
2017/01/17 10:30:17
It's not impossible however - typically the data c
|
if not opts.get('title'): |
- opts['title'] = ui.prompt('New review title: ', '') |
+ # Drop everything but the first line of description in title |
+ opts['title'] = description.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'] = description |
path = (ui.config('paths', 'default-push') |
or ui.config('paths', 'default') |