D441: revset: optimize "draft() & ::x" pattern

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Aug 19 00:30:25 EDT 2017


yuja added inline comments.

INLINE COMMENTS

> revsetlang.py:492
> +                      'follow')))
> +        if matched:
> +            return w, ('func', ('symbol', '_phaseandancestors'),

FWIW, I wrote placeholder matcher once, which could be used as follows.

  m = _matchtree('_() & ::_', ('and', ta, tb))
  if m and getsymbol(m[1]) in _fastphases:
      ...

https://bitbucket.org/yuja/hg-work/commits/6c0ae642d86a188af8e940e430522e915f478b25

This is outdated and needs modification, but do you like it?

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list