view contrib/debugshell.py @ 16482:a5d359b3927a stable

tests: remove test-pull-pull-corruption2.t This test gave random failures on slow machines (solaris). The test was added in 6f6e210b38cf as a test case from issue148. It did however require manual setup: The attached script creates such a corruption (you have to add a "import time; time.spleep(3)" in localrepo.addchangegroup before the changegroup manifest are written for example. The test as it is has thus no value as automatic test case. The necessary sleep could be added by a hook, but test-pending.t already tests that.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 23 Apr 2012 01:39:26 +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, [])
}