comparison mercurial/commands.py @ 50984: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 1144c69c7f58
children 752c5a5b73c6
comparison
equal deleted inserted replaced
50980:8343947af6a7 50984:727428c7e1fc
17 nullrev, 17 nullrev,
18 short, 18 short,
19 wdirrev, 19 wdirrev,
20 ) 20 )
21 from . import ( 21 from . import (
22 admin_commands as admin_commands_mod,
22 archival, 23 archival,
23 bookmarks, 24 bookmarks,
24 bundle2, 25 bundle2,
25 bundlecaches, 26 bundlecaches,
26 changegroup, 27 changegroup,
73 urlutil, 74 urlutil,
74 ) 75 )
75 76
76 table = {} 77 table = {}
77 table.update(debugcommandsmod.command._table) 78 table.update(debugcommandsmod.command._table)
79 table.update(admin_commands_mod.command._table)
78 80
79 command = registrar.command(table) 81 command = registrar.command(table)
80 INTENT_READONLY = registrar.INTENT_READONLY 82 INTENT_READONLY = registrar.INTENT_READONLY
81 83
82 # common command options 84 # common command options