##// 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 cmdutil,
21 cmdutil,
22 commands,
22 commands,
23 copies,
23 copies,
24 debugcommands,
25 exchange,
24 exchange,
26 extensions,
25 extensions,
27 filemerge,
26 filemerge,
@@ -40,11 +39,6 b' from . import ('
40 )
39 )
41
40
42 def uisetup(ui):
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 # Disable auto-status for some commands which assume that all
42 # Disable auto-status for some commands which assume that all
49 # files in the result are under Mercurial's control
43 # files in the result are under Mercurial's control
50
44
@@ -26,6 +26,7 b' from . import ('
26 changegroup,
26 changegroup,
27 cmdutil,
27 cmdutil,
28 copies,
28 copies,
29 debugcommands as debugcommandsmod,
29 destutil,
30 destutil,
30 dirstateguard,
31 dirstateguard,
31 discovery,
32 discovery,
@@ -59,6 +60,7 b' from . import ('
59 release = lockmod.release
60 release = lockmod.release
60
61
61 table = {}
62 table = {}
63 table.update(debugcommandsmod.command._table)
62
64
63 command = registrar.command(table)
65 command = registrar.command(table)
64
66
@@ -32,7 +32,6 b' from . import ('
32 changegroup,
32 changegroup,
33 cmdutil,
33 cmdutil,
34 color,
34 color,
35 commands,
36 context,
35 context,
37 dagparser,
36 dagparser,
38 dagutil,
37 dagutil,
@@ -71,9 +70,7 b' from . import ('
71
70
72 release = lockmod.release
71 release = lockmod.release
73
72
74 # We reuse the command table from commands because it is easier than
73 command = registrar.command()
75 # teaching dispatch about multiple tables.
76 command = registrar.command(commands.table)
77
74
78 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True)
75 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True)
79 def debugancestor(ui, repo, *args):
76 def debugancestor(ui, repo, *args):
@@ -25,7 +25,6 b' from . import ('
25 cmdutil,
25 cmdutil,
26 color,
26 color,
27 commands,
27 commands,
28 debugcommands,
29 demandimport,
28 demandimport,
30 encoding,
29 encoding,
31 error,
30 error,
@@ -750,10 +749,6 b' def _dispatch(req):'
750 rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
749 rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
751 path, lui = _getlocal(ui, rpath)
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 uis = {ui, lui}
752 uis = {ui, lui}
758
753
759 if req.repo:
754 if req.repo:
General Comments 0
You need to be logged in to leave comments. Login now