##// END OF EJS Templates
debugcommands: use temporary dict for its command table...
Yuya Nishihara -
r32377:c942c83a default
parent child Browse files
Show More
@@ -21,7 +21,6 b' from mercurial import ('
21 21 cmdutil,
22 22 commands,
23 23 copies,
24 debugcommands,
25 24 exchange,
26 25 extensions,
27 26 filemerge,
@@ -40,11 +39,6 b' from . import ('
40 39 )
41 40
42 41 def uisetup(ui):
43 # TODO: debugcommands should use a separate command table
44 # Side-effect of accessing is debugcommands module is guaranteed to be
45 # imported and commands.table is populated.
46 debugcommands.command
47
48 42 # Disable auto-status for some commands which assume that all
49 43 # files in the result are under Mercurial's control
50 44
@@ -26,6 +26,7 b' from . import ('
26 26 changegroup,
27 27 cmdutil,
28 28 copies,
29 debugcommands as debugcommandsmod,
29 30 destutil,
30 31 dirstateguard,
31 32 discovery,
@@ -59,6 +60,7 b' from . import ('
59 60 release = lockmod.release
60 61
61 62 table = {}
63 table.update(debugcommandsmod.command._table)
62 64
63 65 command = registrar.command(table)
64 66
@@ -32,7 +32,6 b' from . import ('
32 32 changegroup,
33 33 cmdutil,
34 34 color,
35 commands,
36 35 context,
37 36 dagparser,
38 37 dagutil,
@@ -71,9 +70,7 b' from . import ('
71 70
72 71 release = lockmod.release
73 72
74 # We reuse the command table from commands because it is easier than
75 # teaching dispatch about multiple tables.
76 command = registrar.command(commands.table)
73 command = registrar.command()
77 74
78 75 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True)
79 76 def debugancestor(ui, repo, *args):
@@ -25,7 +25,6 b' from . import ('
25 25 cmdutil,
26 26 color,
27 27 commands,
28 debugcommands,
29 28 demandimport,
30 29 encoding,
31 30 error,
@@ -750,10 +749,6 b' def _dispatch(req):'
750 749 rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
751 750 path, lui = _getlocal(ui, rpath)
752 751
753 # Side-effect of accessing is debugcommands module is guaranteed to be
754 # imported and commands.table is populated.
755 debugcommands.command
756
757 752 uis = {ui, lui}
758 753
759 754 if req.repo:
General Comments 0
You need to be logged in to leave comments. Login now