D451: revset: remove order information from tree

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Mon Aug 28 09:16:40 EDT 2017


yuja added a comment.


  > You can `phabsend .` which will update this patch
  
  Done.
  
  >> Perhaps we can eliminate preserveorder flag from _optimize() at all.
  > 
  > I like that simplicity. I don't think `or` optimization is that important (so there was no `_flipor`).
  
  Let's revert https://phab.mercurial-scm.org/rHGc63cb2d10d6d5dc823853300f14fa9638bccfb68 then.

INLINE COMMENTS

> quark wrote in revset.py:892
> Since we had `_notpublic`, I felt the practice here was to not "pollute" the "methods" table. i.e. "methods" can only contain names outputted directly from the parser.
> 
> So I still slightly prefer not using an operator. What do you think?

I don't have strong preference as we already have pseudo operator `difference`.

> quark wrote in revsetlang.py:435
> I thought since `_notpublic` is atomic and cannot be further split. `preserveorder` does not matter here.

It's just for logical correctness. Since `not public()` is replaced with 
`_notpublic()`, the ordering constraint should be derived from
`not public()`, not from `public()`.

> quark wrote in revsetlang.py:459
> Not sure. I think it's similar to function argument (which we preserves order by default in line 463).

`preserveorder` is switched to `True` at `func` node, and its
child `list` just passes around it. The same rule should apply to
`keyvalue`.

Anyway, we should get rid of it from `_optimize()`.

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers
Cc: martinvonz, yuja, mercurial-devel


More information about the Mercurial-devel mailing list