Submitter | Boris Feld |
---|---|
Date | Aug. 24, 2018, 10:35 p.m. |
Message ID | <57160a3b6795cfde3256.1535150140@FB-lair> |
Download | mbox | patch |
Permalink | /patch/34039/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -1566,6 +1566,12 @@ def _phase(repo, subset, *targets): """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."""