--- a/tests/autodiff.py Sun May 04 21:33:14 2014 -0700
+++ b/tests/autodiff.py Sun May 04 22:48:07 2014 -0700
@@ -1,8 +1,14 @@
# Extension dedicated to test patch.diff() upgrade modes
#
#
-from mercurial import scmutil, patch, util
+from mercurial import cmdutil, scmutil, patch, util
+cmdtable = {}
+command = cmdutil.command(cmdtable)
+
+@command('autodiff',
+ [('', 'git', '', 'git upgrade mode (yes/no/auto/warn/abort)')],
+ '[OPTION]... [FILE]...')
def autodiff(ui, repo, *pats, **opts):
diffopts = patch.diffopts(ui, opts)
git = opts.get('git', 'no')
@@ -36,11 +42,3 @@
ui.write(chunk)
for fn in sorted(brokenfiles):
ui.write(('data lost for: %s\n' % fn))
-
-cmdtable = {
- "autodiff":
- (autodiff,
- [('', 'git', '', 'git upgrade mode (yes/no/auto/warn/abort)'),
- ],
- '[OPTION]... [FILE]...'),
-}