Mercurial > hg
comparison hgext/mq.py @ 31024:0b8356705de6
revset: split language services to revsetlang module (API)
New revsetlang module hosts parser, tokenizer, and miscellaneous functions
working on parsed tree. It does not include functions for evaluation such as
getset() and match().
2288 mercurial/revset.py
684 mercurial/revsetlang.py
2972 total
get*() functions are aliased since they are common in revset.py.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 19 Feb 2017 18:19:33 +0900 |
parents | aea06029919e |
children | 861b070d92da |
comparison
equal
deleted
inserted
replaced
31023:aea06029919e | 31024:0b8356705de6 |
---|---|
87 lock as lockmod, | 87 lock as lockmod, |
88 patch as patchmod, | 88 patch as patchmod, |
89 phases, | 89 phases, |
90 pycompat, | 90 pycompat, |
91 registrar, | 91 registrar, |
92 revset, | 92 revsetlang, |
93 scmutil, | 93 scmutil, |
94 smartset, | 94 smartset, |
95 subrepo, | 95 subrepo, |
96 util, | 96 util, |
97 ) | 97 ) |
3566 | 3566 |
3567 @revsetpredicate('mq()') | 3567 @revsetpredicate('mq()') |
3568 def revsetmq(repo, subset, x): | 3568 def revsetmq(repo, subset, x): |
3569 """Changesets managed by MQ. | 3569 """Changesets managed by MQ. |
3570 """ | 3570 """ |
3571 revset.getargs(x, 0, 0, _("mq takes no arguments")) | 3571 revsetlang.getargs(x, 0, 0, _("mq takes no arguments")) |
3572 applied = set([repo[r.node].rev() for r in repo.mq.applied]) | 3572 applied = set([repo[r.node].rev() for r in repo.mq.applied]) |
3573 return smartset.baseset([r for r in subset if r in applied]) | 3573 return smartset.baseset([r for r in subset if r in applied]) |
3574 | 3574 |
3575 # tell hggettext to extract docstrings from these functions: | 3575 # tell hggettext to extract docstrings from these functions: |
3576 i18nfunctions = [revsetmq] | 3576 i18nfunctions = [revsetmq] |