contrib/debugshell.py
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 28 Aug 2013 22:09:53 +0900
branchstable
changeset 19646 335a558f81dc
parent 11633 6b7b99867ada
child 19771 3bc675361206
permissions -rw-r--r--
tags: write tag overwriting history also into tag cache file (issue3911) Before this patch, tag overwriting history is not written into tag cache file ".hg/cache/tags". This may give higher priority to local tag than global one, even if the former is overwritten by the latter, because tag overwriting history is used to compare priorities of them (as "rank"). In such cases, "hg tags" invocations using tag cache file shows incorrect tag information. This patch writes tag overwriting history also into tag cache file.

# 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, [])
}