Mercurial > public > mercurial-scm > hg-stable
annotate mercurial/admin_commands.py @ 50995:727428c7e1fc
commands: add admin namespace
In order to stop abusing the 'debug' namespace for non-debug command,
it adds a new 'admin' namespace dedicated to 'admin' operations on a
repository (i.e commands suitable for administration tasks).
This namespace entry would be used to migrate in the future some
existing commands from the 'debug' namespace, or other top level
commands that may not be directly exposed to end users.
(verify command is a perfect candidate for this case)
author | Franck Bret <franck.bret@octobus.net> |
---|---|
date | Wed, 25 Jan 2023 15:33:39 +0100 |
parents | |
children | 752c5a5b73c6 |
rev | line source |
---|---|
50995
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
1 # admin_commands.py - command processing for admin* commands |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
2 # |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
3 # Copyright 2022 Mercurial Developers |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
4 # |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
5 # This software may be used and distributed according to the terms of the |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
6 # GNU General Public License version 2 or any later version. |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
7 |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
8 from . import registrar |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
9 |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
10 table = {} |
727428c7e1fc
commands: add admin namespace
Franck Bret <franck.bret@octobus.net>
parents:
diff
changeset
|
11 command = registrar.command(table) |