[PATCH 3 of 6] largefiles: port configitems to exthelper
Yuya Nishihara
yuya at tcha.org
Fri Dec 28 00:02:10 EST 2018
On Thu, 27 Dec 2018 16:13:02 -0500, Matt Harbison wrote:
> On Thu, 27 Dec 2018 06:29:09 -0500, Yuya Nishihara <yuya at tcha.org> wrote:
>
> > On Wed, 26 Dec 2018 16:33:35 -0500, Matt Harbison wrote:
> >> # HG changeset patch
> >> # User Matt Harbison <matt_harbison at yahoo.com>
> >> # Date 1545599773 18000
> >> # Sun Dec 23 16:16:13 2018 -0500
> >> # Node ID be536e648c4f96fa625a6222e9c50d45fee38bb5
> >> # Parent 04b6bbd552360d479d44e956d1e0c201d19f15ef
> >> largefiles: port configitems to exthelper
> >
> >> from mercurial import (
> >> + configitems,
> >> + exthelper,
> >> hg,
> >> localrepo,
> >> registrar,
> >> @@ -126,19 +128,19 @@ from . import (
> >> # leave the attribute unspecified.
> >> testedwith = 'ships-with-hg-core'
> >>
> >> -configtable = {}
> >> -configitem = registrar.configitem(configtable)
> >> +eh = exthelper.exthelper()
> >>
> >> -configitem('largefiles', 'minsize',
> >> - default=configitem.dynamicdefault,
> >> +eh.configitem('largefiles', 'minsize',
> >> + default=configitems.dynamicdefault,
> >
> > Nit: eh.configitem.dynamicdefault ?
>
> Not sure- I don't know what the difference between configitems and
> configitem really is. The examples I saw in core used configitems, so I
> assumed it was just a typo. It works, and we would be able to drop one
> import though.
Yep, that's the point that registrar objects "reexport" some constants.
More information about the Mercurial-devel
mailing list