obsfate: split markers fetch from successor set annotation
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 16 Jun 2017 17:58:17 +0200
changeset 2610 ee37ab3de5f7
parent 2609 81a94da65dca
child 2611 45f5dbb24684
obsfate: split markers fetch from successor set annotation This will help to improve support for pruned changesets.
hgext3rd/evolve/obshistory.py
hgext3rd/evolve/templatekw.py
--- a/hgext3rd/evolve/obshistory.py	Fri Jun 16 17:55:55 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri Jun 16 17:58:17 2017 +0200
@@ -671,12 +671,11 @@
 
     return markers
 
-def preparesuccessorset(successorset, pathscache):
+def preparesuccessorset(successorset, rawmarkers):
     """ For a successor set, get all related markers, compute the set of user,
     the min date and the max date
     """
     hex = nodemod.hex
-    rawmarkers = successorsetallmarkers(successorset, pathscache)
 
     successorset = [hex(n) for n in successorset]
 
--- a/hgext3rd/evolve/templatekw.py	Fri Jun 16 17:55:55 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py	Fri Jun 16 17:58:17 2017 +0200
@@ -141,7 +141,8 @@
 
     values = []
     for sset in successorssets:
-        raw = obshistory.preparesuccessorset(sset, pathcache)
+        rawmarkers = obshistory.successorsetallmarkers(sset, pathcache)
+        raw = obshistory.preparesuccessorset(sset, rawmarkers)
 
         # As we can't do something like
         # "{join(map(nodeshort, successors), ', '}" in template, manually