obsfate: improve prune support in _successorsetverb
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 16 Jun 2017 16:50:11 +0200
changeset 2606 02129bed002c
parent 2605 7d9608219362
child 2607 054d92586e43
obsfate: improve prune support in _successorsetverb In the prune case, still have markers (at least the prune markers). If we want to be able to return these markers we need the underlying function to support it.
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Fri Jun 16 12:37:03 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri Jun 16 16:50:11 2017 +0200
@@ -629,11 +629,11 @@
 def _successorsetverb(successorset, markers):
     """ Return the verb summarizing the successorset
     """
-    # XXX we need to handle prune markers at some point.
-    if not markers:
-        return {'verb': 'pruned'}
-
-    return {'verb': 'rewritten'}
+    if not successorset:
+        verb = 'pruned'
+    else:
+        verb = 'rewritten'
+    return {'verb': verb}
 
 FORMATSSETSFUNCTIONS = [
     _successorsetdates,