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

Unified Diff: hgreview.py

Issue 29352960: Issue 4319 - [hgreview] Make sure reviews for the initial repository revision can be created (Closed) Base URL: https://hg.adblockplus.org/codingtools/
Patch Set: Created Sept. 13, 2016, 7:45 p.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
@@ -42,17 +42,18 @@ def review(ui, repo, *paths, **opts):
args.append('--quiet')
if 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'):
- args.extend(['--rev', '{0}^:{0}'.format(opts['change'])])
+ rev = repo[opts['change']]
+ 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
if not opts.get('title') and opts.get('change'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld