[PATCH 2 of 6 V2] revset: adds includepath argument to revsbetween

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Aug 7 12:42:07 CDT 2015



On 08/07/2015 02:28 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1434770334 25200
> #      Fri Jun 19 20:18:54 2015 -0700
> # Branch stable
> # Node ID 812d9212f1474df436453d08b7c71a44549524a3
> # Parent  c5d77654f500692aae08a0f5b0026e200b0971b7
> revset: adds includepath argument to revsbetween
>
> This patch is part of a series of patches to speed up the computation of
> revset.revsbetween by introducing a C implementation. The main motivation is to
> speed up smartlog on big repositories. At the end of the series, on our big
> repositories the computation of revsbetween is 10-50x faster and smartlog on is
> 2x-5x faster.
>
> This patch adds a new argument to revsbetween called includepath. This allows us
> to compute grandparent with revsbetween and remove the code of grandparent in
> the next patch.

The idea was to rename the function too.

Now that the function do two things:

<(1)find reachable roots><(2) compute the path between heads and roots>

My issue with revbetween(onlyroot) is that it reads as "(1+2)[-(!1)]".

The idea would be to have a function name that carry (1) and an argument 
name that carry (2).

My initial proposal (to sparkle the debate) was:

   reachedroots(roots, heads, includepath=False)

I'll be fine with anything that read as (1) + [(2)].

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list