hgext/evolve.py
changeset 659 1db801bcd08f
parent 658 2a2b8c95bb43
child 663 9d4ff0809a00
--- a/hgext/evolve.py	Fri Jan 25 16:42:49 2013 +0100
+++ b/hgext/evolve.py	Fri Jan 25 16:59:20 2013 +0100
@@ -353,26 +353,15 @@
     return ctx.bumped()
 
 @eh.addattr(context.changectx, 'conflicting')
-@eh.addattr(context.changectx, 'divergent')
-def divergent(ctx):
+def conflicting(ctx):
     """is the changeset divergent (Try to succeed to public change)"""
-    if ctx.node() is None:
-        return False
-    return ctx.rev() in getrevs(ctx._repo, 'divergent')
+    return ctx.divergent()
 
 ### revset symbol
 
 eh.revset('latecomer')(revset.symbols['bumped'])
 
-@eh.revset('conflicting')
-@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 = getrevs(repo, 'divergent')
-    return [r for r in subset if r in conf]
+eh.revset('conflicting')(revset.symbols['divergent'])