D6140: revset: add new contiguous(x) function for "x::x"

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Mar 15 14:11:55 EDT 2019


I chatted a bit with Georges about this. He suggested something along 
the line of `fill` or `complete`.

On 3/15/19 4:28 PM, martinvonz (Martin von Zweigbergk) wrote:
> martinvonz added a comment.
> 
> 
>    In https://phab.mercurial-scm.org/D6140#89400, @marmoute wrote:
>    
>    > I am a fan of this function, I need this on a regular basis. Having an
>    >  explicit function for this also open the way to various optimization.
>    >  For example we know that a set already has this property we could skip
>    >  all computation.
>    >
>    > I am ambivalent about the naming however. It feels a bit odd. There are
>    >  case where it could be misleading.
>    >
>    > Lets look at the following case:
>    >
>    >   c e
>    >   | |
>    >   b d
>    >   |/
>    >   a
>    >
>    >
>    > the revset `(b+c+d+e)::(b+c+d+e)` returns the same `b+c+d+e`, however
>    >  the set is not "contiguous" as `b+c` and `d+e` as not connected.
>    
>    
>    Right, that's what I tried to express with "without adding new common ancestors or common descendants" in the documentation.
>    
>    > This feels a bit more like a "closure" operation to me.
>    
>    That's what I suggested on IRC because the operation somehow made me think of a closure, but when I looked up what a closure is, it seems like `ancestors()` is the actual closure function (if we consider the direction to point from child to parents as we normally do).
> 
> REPOSITORY
>    rHG Mercurial
> 
> REVISION DETAIL
>    https://phab.mercurial-scm.org/D6140
> 
> To: martinvonz, #hg-reviewers
> Cc: marmoute, mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list