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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Mar 15 06:52:56 EDT 2019


marmoute added a comment.


  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.
  
  This feels a bit more like a "closure" operation to me.
  
  Cheers,

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6140

To: martinvonz, #hg-reviewers
Cc: marmoute, mercurial-devel


More information about the Mercurial-devel mailing list