Mercurial > hg
view contrib/debugshell.py @ 14611:adbf5e7df96d
import: add --bypass option
This feature is more a way to test patching without a working directory than
something people asked about. Adding a --rev option to specify the parent patch
revision would make it a little more useful.
What this change introduces is patch.repobackend class which let patches be
applied against repository revisions. The caller must supply a filestore object
to receive patched content, which can be turned into a memctx with
patch.makememctx() helper.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 14 Jun 2011 23:26:35 +0200 |
parents | 6b7b99867ada |
children | 3bc675361206 |
line wrap: on
line source
# 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, []) }