| 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: |
|
Sebastian Noack
2018/08/02 17:13:21
Nit: Bare except is discouraged by PEP-8 (and woul
hub
2018/08/02 18:16:56
fixed.
Sebastian Noack
2018/08/02 19:11:30
I suppose catching AttributeError specifically wou
hub
2018/08/02 19:41:16
I was being broad, but yes that work.
|
| + 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'), |