diff --git a/contrib/debugshell.py b/contrib/debugshell.py --- a/contrib/debugshell.py +++ b/contrib/debugshell.py @@ -4,17 +4,22 @@ import mercurial import code -def debugshell(ui, repo, **opts): +def pdb(ui, repo, msg, **opts): objects = { 'mercurial': mercurial, 'repo': repo, 'cl': repo.changelog, 'mf': repo.manifest, } + + code.interact(msg, local=objects) + +def debugshell(ui, repo, **opts): bannermsg = "loaded repo : %s\n" \ "using source: %s" % (repo.root, mercurial.__path__[0]) - code.interact(bannermsg, local=objects) + + pdb(ui, repo, bannermsg, **opts) cmdtable = { "debugshell|dbsh": (debugshell, [])