changeset 576:cf116ffc9cc5 stable

evolve: new divergent revset
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 27 Sep 2012 16:55:08 +0200
parents 36de5e30d3eb
children 2cd2ee20d9fa
files hgext/evolve.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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