[PATCH 4 of 9] localrepo: add findbyrevnum for convenience

Matt Mackall mpm at selenic.com
Tue Mar 31 12:59:48 CDT 2015


On Tue, 2015-03-31 at 13:02 -0400, Augie Fackler wrote:
> On Tue, Mar 31, 2015 at 12:54 PM, Pierre-Yves David
> <pierre-yves.david at ens-lyon.org> wrote:
> >
> >
> > On 03/31/2015 02:55 AM, FUJIWARA Katsunori wrote:
> >>      - use lookup functions factored out to "repolookup.py", otherwise
> >
> >
> > I think that getting the lookup logic out of context.py would make sense.
> > I've never been very comfortable with having this critical logic in
> > context.py.
>
> Yeah, I think having lookup functions live outside context makes a
> bunch of sense.

The code is where it needs to be to make context creation as
light-weight as possible. We create so many contexts in inner loops and
such that sticking function calls in here matters. I'd rather have two
copies of this code than introduce overhead here.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list