mercurial/revset.py
changeset 39274 31c0ee6eb0ac
parent 38810 4fe8d1f077b8
child 39303 1eb370761fa0
--- a/mercurial/revset.py	Thu Aug 23 01:15:19 2018 +0200
+++ b/mercurial/revset.py	Thu Aug 23 01:48:26 2018 +0200
@@ -1566,6 +1566,12 @@
     """helper to select all rev in <targets> phases"""
     return repo._phasecache.getrevset(repo, targets, subset)
 
+@predicate('_phase(idx)', safe=True)
+def phase(repo, subset, x):
+    l = getargs(x, 1, 1, ("_phase requires one argument"))
+    target = getinteger(l[0], ("_phase expects a number"))
+    return _phase(repo, subset, target)
+
 @predicate('draft()', safe=True)
 def draft(repo, subset, x):
     """Changeset in draft phase."""