1537 getargs(x, 0, 0, _("secret takes no arguments")) |
1537 getargs(x, 0, 0, _("secret takes no arguments")) |
1538 target = phases.secret |
1538 target = phases.secret |
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`` |
1558 The set. |
1558 The set. |
1559 ``set^1`` (or ``set^``), ``set^2`` |
1559 ``set^1`` (or ``set^``), ``set^2`` |