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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Mar 19 14:06:20 EDT 2019

marmoute added a comment.

  In https://phab.mercurial-scm.org/D6140#89738, @martinvonz wrote:
  > In https://phab.mercurial-scm.org/D6140#89733, @marmoute wrote:
  > > […]
  > >  What Martin is trying to achieve here is a simple function to express 
  > >  X::X. So maybe it could be a special case of a function expression X::Y. 
  > >  However, we don't have this function right now. Maybe we jut need to 
  > >  introduce it, with a clear name eg `revbetween` or `connected` or 
  > >  `dagrange`, with an optionnal second arguments:
  > >
  > > - X::Y → dagrange(X, Y)
  > > - X::X → dagrange(X)
  > And `::X` and `X::`? Maybe `dagrange(heads=X)` and `dagrange(roots=X)`, respectively? That implies that `roots` and `heads` default to `null` and `heads()`, but it seems weird that `dagrange(X)` is equivalent to `dagrange(roots=X, heads=X)`.
  `::X` and `X::` are cover by `ancestors(X)` and `descendant(X)`, so they are already covered. They are also a bit different from X::Y as they are simpler (bounded only on one side). I don't think we need to cover these case in "dagrange".

  rHG Mercurial


To: martinvonz, #hg-reviewers
Cc: yuja, av6, spectral, gracinet, marmoute, mercurial-devel

More information about the Mercurial-devel mailing list