changeset 30504:c3bdc27121d1

debugcommands: move 'debugcommands' in the new module The commit message isn't an illusion. There is a "debugcommands" module and command.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 17 Aug 2016 20:40:13 -0700
parents 6bfb333a6f2f
children 158b41842fd2
files mercurial/commands.py mercurial/debugcommands.py
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Aug 17 20:38:29 2016 -0700
+++ b/mercurial/commands.py	Wed Aug 17 20:40:13 2016 -0700
@@ -1867,14 +1867,6 @@
     with repo.wlock(False):
         return cmdutil.copy(ui, repo, pats, opts)
 
-@command('debugcommands', [], _('[COMMAND]'), norepo=True)
-def debugcommands(ui, cmd='', *args):
-    """list all available commands and options"""
-    for cmd, vals in sorted(table.iteritems()):
-        cmd = cmd.split('|')[0].strip('^')
-        opts = ', '.join([i[1] for i in vals[1]])
-        ui.write('%s: %s\n' % (cmd, opts))
-
 @command('debugcomplete',
     [('o', 'options', None, _('show the command options'))],
     _('[-o] CMD'),
--- a/mercurial/debugcommands.py	Wed Aug 17 20:38:29 2016 -0700
+++ b/mercurial/debugcommands.py	Wed Aug 17 20:40:13 2016 -0700
@@ -321,3 +321,11 @@
     if errors:
         error = _(".hg/dirstate inconsistent with current parent's manifest")
         raise error.Abort(error)
+
+@command('debugcommands', [], _('[COMMAND]'), norepo=True)
+def debugcommands(ui, cmd='', *args):
+    """list all available commands and options"""
+    for cmd, vals in sorted(commands.table.iteritems()):
+        cmd = cmd.split('|')[0].strip('^')
+        opts = ', '.join([i[1] for i in vals[1]])
+        ui.write('%s: %s\n' % (cmd, opts))