Mercurial > hg
changeset 40310:d894d2372ffe
revset: document the `revset(...)` syntax
We introduce a new "no-op" function to bear the documentation. In practice, the
parsing step is skipping it so it is not even called. This will get fixed in
the next changeset.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 11 Oct 2018 03:13:53 +0200 |
parents | 1bd3e922de18 |
children | 4aa04d009167 |
files | mercurial/revset.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Oct 16 12:39:21 2018 +0200 +++ b/mercurial/revset.py Thu Oct 11 03:13:53 2018 +0200 @@ -1751,6 +1751,16 @@ return baseset() return subset & baseset([l]) +@predicate('revset(set)', safe=True, takeorder=True) +def revsetpredicate(repo, subset, x, order): + """Strictly interpret the content as a revset. + + The content of this special predicate will be strictly interpreted as a + revset. For example, ``revset(id(0))`` will be interpreted as "id(0)" + without possible ambiguity with a "id(0)" bookmark or tag. + """ + return getset(repo, subset, x, order) + @predicate('matching(revision [, field])', safe=True) def matching(repo, subset, x): """Changesets in which a given set of fields match the set of fields in the