Index: hgreview.py |
=================================================================== |
--- a/hgreview.py |
+++ b/hgreview.py |
@@ -47,17 +47,18 @@ |
if (not opts.get('no_mail') and |
(not opts.get('issue') or opts.get('message'))): |
args.append('--send_mail') |
if opts.get('revision') and opts.get('change'): |
raise error.Abort('Ambiguous revision range, only one of --revision and --change can be specified.') |
if opts.get('change'): |
- rev = repo[opts['change']] |
+ rev_no = repo.revs(opts['change']).first() |
+ rev = repo[rev_no] |
args.extend(['--rev', '{}:{}'.format(rev.parents()[0], rev)]) |
elif opts.get('revision'): |
args.extend(['--rev', opts['revision']]) |
else: |
raise error.Abort('What should be reviewed? Either --revision or --change is required.') |
if not opts.get('issue'): |
# New issue, make sure title and message are set |