##// END OF EJS Templates
debugshell: declare command using decorator
Gregory Szorc -
r21243:8b5c039f default
parent child Browse files
Show More
@@ -4,6 +4,10 b''
4 4 import sys
5 5 import mercurial
6 6 import code
7 from mercurial import cmdutil
8
9 cmdtable = {}
10 command = cmdutil.command(cmdtable)
7 11
8 12 def pdb(ui, repo, msg, **opts):
9 13 objects = {
@@ -24,6 +28,7 b' def ipdb(ui, repo, msg, **opts):'
24 28
25 29 IPython.embed()
26 30
31 @command('debugshell|dbsh', [])
27 32 def debugshell(ui, repo, **opts):
28 33 bannermsg = "loaded repo : %s\n" \
29 34 "using source: %s" % (repo.root,
@@ -47,7 +52,3 b' def debugshell(ui, repo, **opts):'
47 52 debugger = 'pdb'
48 53
49 54 getattr(sys.modules[__name__], debugger)(ui, repo, bannermsg, **opts)
50
51 cmdtable = {
52 "debugshell|dbsh": (debugshell, [])
53 }
General Comments 0
You need to be logged in to leave comments. Login now