evolve: new divergent revset stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 27 Sep 2012 16:55:08 +0200
branchstable
changeset 576 cf116ffc9cc5
parent 575 36de5e30d3eb
child 577 2cd2ee20d9fa
evolve: new divergent revset
hgext/evolve.py
--- a/hgext/evolve.py	Thu Sep 27 16:40:25 2012 +0200
+++ b/hgext/evolve.py	Thu Sep 27 16:55:08 2012 +0200
@@ -554,6 +554,15 @@
     conf = getobscache(repo, 'conflicting')
     return [r for r in subset if r in conf]
 
+@eh.revset('divergent')
+def revsetdivergent(repo, subset, x):
+    """``divergent()``
+    Changesets marked as successors of a same changeset.
+    """
+    args = revset.getargs(x, 0, 0, 'divergent takes no arguments')
+    conf = getobscache(repo, 'conflicting')
+    return [r for r in subset if r in conf]
+
 
 ### Discovery wrapping