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

Unified Diff: hgreview.py

Issue 29350365: Issue 4388 - [hgreview] Reviews should use Base URL field in order to indicate the repository (Closed) Base URL: https://hg.adblockplus.org/codingtools/
Patch Set: Created Aug. 31, 2016, 4:04 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
@@ -65,34 +65,31 @@ def review(ui, repo, *paths, **opts):
if not opts.get('message'):
opts['message'] = opts['title']
path = (ui.config('paths', 'default-push')
or ui.config('paths', 'default')
or '')
match = re.search(r'^(?:https://|ssh://hg@)(.*)', path)
if match:
- opts['message'] = '{0}\n\nRepository: {1}'.format(
- opts['message'].strip(),
- match.group(1)
- )
+ opts['base_url'] = 'https://' + match.group(1)
# Make sure there is at least one reviewer
if not opts.get('reviewers'):
opts['reviewers'] = ui.prompt('Reviewers (comma-separated): ', '')
if not opts['reviewers'].strip():
raise error.Abort('No reviewers given.')
for opt in ('reviewers', 'cc'):
if opts.get(opt):
users = [u if '@' in u else u + '@adblockplus.org'
for u in re.split(r'\s*,\s*', opts[opt])]
opts[opt] = ','.join(users)
- for opt in ('issue', 'title', 'message', 'reviewers', 'cc'):
+ for opt in ('issue', 'title', 'message', 'reviewers', 'cc', 'base_url'):
if opts.get(opt, ''):
args.extend(['--' + opt, opts[opt]])
for opt in ('private', 'assume_yes', 'print_diffs'):
if opts.get(opt, False):
args.append('--' + opt)
args.extend(paths)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld