##// END OF EJS Templates
hgweb: show correct error message for i18n environment...
hgweb: show correct error message for i18n environment If exception is error.LookupError and running in i18n environment, below condition is always true. Because msg is translated and dosen't contain 'manifest'. if util.safehasattr(err, 'name') and 'manifest' not in msg: This patch creates a new exception class and uses it instead of string match.

File last commit:

r11633:6b7b9986 default
r18855:50c922c1 2.5.3 stable
Show More
debugshell.py
21 lines | 533 B | text/x-python | PythonLexer
# debugshell extension
"""a python shell with repo, changelog & manifest objects"""
import mercurial
import code
def debugshell(ui, repo, **opts):
objects = {
'mercurial': mercurial,
'repo': repo,
'cl': repo.changelog,
'mf': repo.manifest,
}
bannermsg = "loaded repo : %s\n" \
"using source: %s" % (repo.root,
mercurial.__path__[0])
code.interact(bannermsg, local=objects)
cmdtable = {
"debugshell|dbsh": (debugshell, [])
}