| Index: hgreview.py |
| =================================================================== |
| --- a/hgreview.py |
| +++ b/hgreview.py |
| @@ -61,17 +61,17 @@ def review(ui, repo, *paths, **opts): |
| opts['title'] = ui.prompt('New review title: ', '') |
| if not opts['title'].strip(): |
| raise error.Abort('No review title given.') |
| if not opts.get('message'): |
| opts['message'] = opts['title'] |
| path = ui.config('paths', 'default-push') or ui.config('paths', 'default') |
| - match = re.search(r'^(?:https://|ssh://hg@)(.*)', path) |
| + match = re.search(r'^(?:https://|ssh://hg@)(.*)', path or '') |
|
Vasily Kuznetsov
2016/08/16 08:50:48
Perhaps it would make the code a bit more clear if
Wladimir Palant
2016/08/16 10:37:11
Done.
|
| if match: |
| opts['message'] = '{0}\n\nRepository: {1}'.format( |
| opts['message'].strip(), |
| match.group(1) |
| ) |
| # Make sure there is at least one reviewer |
| if not opts.get('reviewers'): |