diff --git a/mercurial/admin/__init__.py b/mercurial/admin/__init__.py new file mode 100644 diff --git a/mercurial/admin_commands.py b/mercurial/admin_commands.py new file mode 100644 --- /dev/null +++ b/mercurial/admin_commands.py @@ -0,0 +1,11 @@ +# admin_commands.py - command processing for admin* commands +# +# Copyright 2022 Mercurial Developers +# +# This software may be used and distributed according to the terms of the +# GNU General Public License version 2 or any later version. + +from . import registrar + +table = {} +command = registrar.command(table) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -19,6 +19,7 @@ from .node import ( wdirrev, ) from . import ( + admin_commands as admin_commands_mod, archival, bookmarks, bundle2, @@ -75,6 +76,7 @@ from .utils import ( table = {} table.update(debugcommandsmod.command._table) +table.update(admin_commands_mod.command._table) command = registrar.command(table) INTENT_READONLY = registrar.INTENT_READONLY diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1309,6 +1309,7 @@ if py2exehacked: packages = [ 'mercurial', + 'mercurial.admin', 'mercurial.cext', 'mercurial.cffi', 'mercurial.defaultrc', diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -68,17 +68,17 @@ basic help $ hg help -c | grep myinit - myinit This is my documented alias for init. + myinit This is my documented alias for init. $ hg help -c | grep mycommit - mycommit This is my alias with only doc. + mycommit This is my alias with only doc. $ hg help -c | grep cleanstatus [1] $ hg help -c | grep lognull - lognull Logs the null rev + lognull Logs the null rev $ hg help -c | grep dln [1] $ hg help -c | grep recursivedoc - recursivedoc Logs the null rev in debug mode + recursivedoc Logs the null rev in debug mode $ hg help myinit hg myinit [OPTIONS] [BLA] [BLE] @@ -603,7 +603,7 @@ command provided extension, should be ab help for a shell alias $ hg help -c | grep rebate - rebate This is my alias which just prints something. + rebate This is my alias which just prints something. $ hg help rebate hg rebate [MYARGS]