[PATCH 1 of 6] extensions: import the exthelper class from evolve ff799015d62e
Matt Harbison
mharbison72 at gmail.com
Sun Dec 2 20:59:42 EST 2018
On Sun, 02 Dec 2018 06:37:12 -0500, Yuya Nishihara <yuya at tcha.org> wrote:
> On Fri, 30 Nov 2018 23:10:55 -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1543121473 18000
>> # Sat Nov 24 23:51:13 2018 -0500
>> # Node ID d5a04a8016a270dce028bddb2483509e0429f113
>> # Parent 33d30fb1e4ae52a283ef487ccf5dfbe59b8a5a68
>> extensions: import the exthelper class from evolve ff799015d62e
>
>> I'm not sure what licensing info to put in place, since it wasn't
>> available on
>> the original copy.
>
> Boris?
>
>> + def configitem(self, section, config,
>> default=configitems.dynamicdefault):
>> + """Register a config item.
>> + """
>> + self._configitem(section, config, default=default)
>
> What's the point of reinventing the registrar functions?
>
> I understand it will be useful to provide decorators for various setup
> hooks, but we have registrar API for table registrations. And less
> coupled
> abstraction is generally better.
On second thought, it looks like there's code in there to help wrap
commands added by other extensions. See self._extcommandwrappers. I
guess we don't need to reinvent configitem/fileset/revset/template, but
maybe that's enough reason to keep command registration?
More information about the Mercurial-devel
mailing list