@@ -21,7 +21,6 @@ from mercurial import (
cmdutil,
commands,
copies,
- debugcommands,
exchange,
extensions,
filemerge,
@@ -40,11 +39,6 @@ from . import (
)
def uisetup(ui):
- # TODO: debugcommands should use a separate command table
- # Side-effect of accessing is debugcommands module is guaranteed to be
- # imported and commands.table is populated.
- debugcommands.command
-
# Disable auto-status for some commands which assume that all
# files in the result are under Mercurial's control
@@ -26,6 +26,7 @@ from . import (
changegroup,
cmdutil,
copies,
+ debugcommands as debugcommandsmod,
destutil,
dirstateguard,
discovery,
@@ -59,6 +60,7 @@ from . import (
release = lockmod.release
table = {}
+table.update(debugcommandsmod.command._table)
command = registrar.command(table)
@@ -32,7 +32,6 @@ from . import (
changegroup,
cmdutil,
color,
- commands,
context,
dagparser,
dagutil,
@@ -71,9 +70,7 @@ from . import (
release = lockmod.release
-# We reuse the command table from commands because it is easier than
-# teaching dispatch about multiple tables.
-command = registrar.command(commands.table)
+command = registrar.command()
@command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True)
def debugancestor(ui, repo, *args):
@@ -25,7 +25,6 @@ from . import (
cmdutil,
color,
commands,
- debugcommands,
demandimport,
encoding,
error,
@@ -750,10 +749,6 @@ def _dispatch(req):
rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
path, lui = _getlocal(ui, rpath)
- # Side-effect of accessing is debugcommands module is guaranteed to be
- # imported and commands.table is populated.
- debugcommands.command
-
uis = {ui, lui}
if req.repo: