| 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 AttributeError: |
| + 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'), |