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

Unified Diff: hgreview.py

Issue 29845569: Noissue - Fix hgreview for Mercurial 4.7: cmdutil.command -> registrar.command (Closed) Base URL: https://hg.adblockplus.org/codingtools/
Patch Set: Don't use bare exceptions Created Aug. 2, 2018, 6:16 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
@@ -6,18 +6,21 @@
import urllib
from mercurial import cmdutil, error
SERVER = 'https://codereview.adblockplus.org'
UPLOADTOOL_URL = SERVER + '/static/upload.py'
cmdtable = {}
-command = cmdutil.command(cmdtable)
-
+try:
+ command = cmdutil.command(cmdtable)
+except Exception:
+ from mercurial import registrar
+ command = registrar.command(cmdtable)
@command('review',
[
('i', 'issue', '', 'If given, adds a patch set to this review, otherwise create a new one.', 'ISSUE'),
('r', 'revision', '', 'Revision to diff against or a revision range to upload.', 'REV'),
('c', 'change', '', 'A single revision to upload.', 'REV'),
('t', 'title', '', 'New review subject or new patch set title.', 'TITLE'),
('m', 'message', '', 'New review description or new patch set message.', 'MESSAGE'),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld