##// END OF EJS Templates
stack: follow-up on the stack revset...
Boris Feld -
r37407:bef863a0 default
parent child Browse files
Show More
@@ -28,7 +28,7 b' from . import ('
28 revsetlang,
28 revsetlang,
29 scmutil,
29 scmutil,
30 smartset,
30 smartset,
31 stack,
31 stack as stackmod,
32 util,
32 util,
33 )
33 )
34 from .utils import (
34 from .utils import (
@@ -1539,19 +1539,19 b' def secret(repo, subset, x):'
1539 return _phase(repo, subset, target)
1539 return _phase(repo, subset, target)
1540
1540
1541 @predicate('stack([revs])', safe=True)
1541 @predicate('stack([revs])', safe=True)
1542 def _stack(repo, subset, x):
1542 def stack(repo, subset, x):
1543 # experimental revset for the stack of changesets or working directory
1543 """Experimental revset for the stack of changesets or working directory
1544 # parent
1544 parent. (EXPERIMENTAL)
1545 """
1545 if x is None:
1546 if x is None:
1546 stacks = stack.getstack(repo, x)
1547 stacks = stackmod.getstack(repo, x)
1547 else:
1548 else:
1548 stacks = smartset.baseset([])
1549 stacks = smartset.baseset([])
1549 for revision in getset(repo, fullreposet(repo), x):
1550 for revision in getset(repo, fullreposet(repo), x):
1550 currentstack = stack.getstack(repo, revision)
1551 currentstack = stackmod.getstack(repo, revision)
1551 stacks = stacks + currentstack
1552 stacks = stacks + currentstack
1552
1553
1553 # Force to use the order of the stacks instead of the subset one
1554 return subset & stacks
1554 return stacks & subset
1555
1555
1556 def parentspec(repo, subset, x, n, order):
1556 def parentspec(repo, subset, x, n, order):
1557 """``set^0``
1557 """``set^0``
General Comments 0
You need to be logged in to leave comments. Login now