[PATCH 3 of 3 V4] largefiles: setup "largefiles" feature in each repositories individually
Siddharth Agarwal
sid0 at fb.com
Thu Sep 26 11:46:22 CDT 2013
On 09/25/2013 08:55 AM, FUJIWARA Katsunori wrote:
> What about below ?
>
> (1) register feature setup function to "featuresetupfuncs" of
> "localrepository" automatically, when extension module has
> "supportedfeatures" like attribute
>
> - are there already existing extensions with
> "supportedfeatures" like attribute for other purposes ?
As I mentioned, our lz4revlog extension is one. You can find the source
code at https://bitbucket.org/facebook/lz4revlog. For now, pending the
results of this discussion, I've added lz4revlog to _basesupported.
Seems like what we really need is some sort of parallel to
uisetup/extsetup. This would ideally be part of reposetup, but as you
mentioned that happens too late. How about adding another hook before
the repo is fully initialized, called only on enabled extensions? I
haven't thought about the exact mechanics of that, though.
def featuresetup(ui, repo):
repo.supported.add('lz4revlog')
and that's all my extension would ideally need to do.
More information about the Mercurial-devel
mailing list