Mercurial > hg
changeset 19771:3bc675361206
debugshell: abstract out pdb code.interact
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 14 Jul 2013 12:10:52 -0500 |
parents | 0361163efbaf |
children | 6ccec36a1fd9 |
files | contrib/debugshell.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/debugshell.py Sun Sep 22 13:52:18 2013 +0400 +++ b/contrib/debugshell.py Sun Jul 14 12:10:52 2013 -0500 @@ -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, [])