Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: hgreview.py

Issue 29897571: Issue 6996 - Fix -c option (Closed) Base URL: https://hg.adblockplus.org/codingtools
Patch Set: Accept various types of revision ids Created Oct. 2, 2018, 10 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld