1749 raise error.ParseError(_("rev expects a number")) |
1749 raise error.ParseError(_("rev expects a number")) |
1750 if l not in repo.changelog and l not in (node.nullrev, node.wdirrev): |
1750 if l not in repo.changelog and l not in (node.nullrev, node.wdirrev): |
1751 return baseset() |
1751 return baseset() |
1752 return subset & baseset([l]) |
1752 return subset & baseset([l]) |
1753 |
1753 |
|
1754 @predicate('revset(set)', safe=True, takeorder=True) |
|
1755 def revsetpredicate(repo, subset, x, order): |
|
1756 """Strictly interpret the content as a revset. |
|
1757 |
|
1758 The content of this special predicate will be strictly interpreted as a |
|
1759 revset. For example, ``revset(id(0))`` will be interpreted as "id(0)" |
|
1760 without possible ambiguity with a "id(0)" bookmark or tag. |
|
1761 """ |
|
1762 return getset(repo, subset, x, order) |
|
1763 |
1754 @predicate('matching(revision [, field])', safe=True) |
1764 @predicate('matching(revision [, field])', safe=True) |
1755 def matching(repo, subset, x): |
1765 def matching(repo, subset, x): |
1756 """Changesets in which a given set of fields match the set of fields in the |
1766 """Changesets in which a given set of fields match the set of fields in the |
1757 selected revision or set. |
1767 selected revision or set. |
1758 |
1768 |