author | Javi Merino <cibervicho@gmail.com> |
Tue, 01 Feb 2011 07:29:11 +0000 | |
branch | stable |
changeset 13330 | 551856dea9a6 |
parent 11633 | 6b7b99867ada |
child 19771 | 3bc675361206 |
permissions | -rw-r--r-- |
11633 | 1 |
# debugshell extension |
2 |
"""a python shell with repo, changelog & manifest objects""" |
|
3 |
||
4 |
import mercurial |
|
5 |
import code |
|
6 |
||
7 |
def debugshell(ui, repo, **opts): |
|
8 |
objects = { |
|
9 |
'mercurial': mercurial, |
|
10 |
'repo': repo, |
|
11 |
'cl': repo.changelog, |
|
12 |
'mf': repo.manifest, |
|
13 |
} |
|
14 |
bannermsg = "loaded repo : %s\n" \ |
|
15 |
"using source: %s" % (repo.root, |
|
16 |
mercurial.__path__[0]) |
|
17 |
code.interact(bannermsg, local=objects) |
|
18 |
||
19 |
cmdtable = { |
|
20 |
"debugshell|dbsh": (debugshell, []) |
|
21 |
} |