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

Unified Diff: hgreview.py

Issue 29349225: Issue 4313 - hg review shouldn't fail if the repository has no URL configured (Closed)
Patch Set: Structure the code a bit better Created Aug. 16, 2016, 10:36 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
@@ -60,17 +60,19 @@ def review(ui, repo, *paths, **opts):
if not opts.get('title'):
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')
+ 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)
)
# Make sure there is at least one reviewer
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld