Patchwork D3136: stack: follow-up on the stack revset

login
register
mail settings
Submitter phabricator
Date April 6, 2018, 12:59 p.m.
Message ID <b95915e7c11f582262bd47e40eae1f97@localhost.localdomain>
Download mbox | patch
Permalink /patch/30437/
State Not Applicable
Headers show

Comments

phabricator - April 6, 2018, 12:59 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbef863a09acd: stack: follow-up on the stack revset (authored by lothiraldan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3136?vs=7737&id=7779

REVISION DETAIL
  https://phab.mercurial-scm.org/D3136

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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``