[PATCH 3 of 3 V3] chgcache: implement repocache

Yuya Nishihara yuya at tcha.org
Sat Mar 11 15:54:17 EST 2017


On Tue, 7 Mar 2017 22:35:59 -0800, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1488953311 28800
> #      Tue Mar 07 22:08:31 2017 -0800
> # Node ID d136f214b3a5bd4698dfd96c641ad73f96a743cb
> # Parent  f0bded8d53c5c9a5cfb25d29dd99cf4eb3fb79b2
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r d136f214b3a5
> chgcache: implement repocache

> +repoloadfunctable = {'changelog': loadchangelog}
> +
> +ui = uimod.ui()
> +ui.setconfig('ui', 'allowemptycommit', '1')
> +
> +repo = localrepo.localrepository(
> +    ui,
> +    os.path.join(os.environ['TESTTMP'], 'repo1'),
> +    create=True)
> +repocache = chgcache.repocache(repo, repoloadfunctable)

Suppose a cache object is attached to a repo by chgserver, do we really need
a global _cache storage?


More information about the Mercurial-devel mailing list