Mercurial > hg-stable
changeset 37389:bef863a09acd
stack: follow-up on the stack revset
Follow good-practice for defining the stack revset.
Differential Revision: https://phab.mercurial-scm.org/D3136
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 05 Apr 2018 17:58:58 +0200 |
parents | 764ada920db5 |
children | b95992605ef1 |
files | mercurial/revset.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Apr 05 23:23:48 2018 -0700 +++ b/mercurial/revset.py Thu Apr 05 17:58:58 2018 +0200 @@ -28,7 +28,7 @@ revsetlang, scmutil, smartset, - stack, + stack as stackmod, util, ) from .utils import ( @@ -1539,19 +1539,19 @@ return _phase(repo, subset, target) @predicate('stack([revs])', safe=True) -def _stack(repo, subset, x): - # experimental revset for the stack of changesets or working directory - # parent +def stack(repo, subset, x): + """Experimental revset for the stack of changesets or working directory + parent. (EXPERIMENTAL) + """ if x is None: - stacks = stack.getstack(repo, x) + stacks = stackmod.getstack(repo, x) else: stacks = smartset.baseset([]) for revision in getset(repo, fullreposet(repo), x): - currentstack = stack.getstack(repo, revision) + currentstack = stackmod.getstack(repo, revision) stacks = stacks + currentstack - # Force to use the order of the stacks instead of the subset one - return stacks & subset + return subset & stacks def parentspec(repo, subset, x, n, order): """``set^0``