comparison hgext3rd/evolve/templatekw.py @ 2611:45f5dbb24684

obsfate: display more data about direct prune markers This does not handle all cases, but this should handle the most common ones.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 16 Jun 2017 18:03:32 +0200
parents ee37ab3de5f7
children fd35b428edfc
comparison
equal deleted inserted replaced
2610:ee37ab3de5f7 2611:45f5dbb24684
137 # closestsuccessors returns an empty list for pruned revisions, remap it 137 # closestsuccessors returns an empty list for pruned revisions, remap it
138 # into a list containing en empty list for future processing 138 # into a list containing en empty list for future processing
139 if successorssets == []: 139 if successorssets == []:
140 successorssets = [[]] 140 successorssets = [[]]
141 141
142 succsmap = repo.obsstore.successors
143 fullsuccessorsets = [] # successor set + markers
144 for sset in successorssets:
145 if sset:
146 markers = obshistory.successorsetallmarkers(sset, pathcache)
147 fullsuccessorsets.append((sset, markers))
148 else:
149 # XXX we do not catch all prune markers (eg rewritten then pruned)
150 # (fix me later)
151 foundany = False
152 for mark in succsmap.get(ctx.node(), ()):
153 if not mark[1]:
154 foundany = True
155 fullsuccessorsets.append((sset, [mark]))
156 if not foundany:
157 fullsuccessorsets.append(([], []))
158
142 values = [] 159 values = []
143 for sset in successorssets: 160 for sset, rawmarkers in fullsuccessorsets:
144 rawmarkers = obshistory.successorsetallmarkers(sset, pathcache)
145 raw = obshistory.preparesuccessorset(sset, rawmarkers) 161 raw = obshistory.preparesuccessorset(sset, rawmarkers)
146 162
147 # As we can't do something like 163 # As we can't do something like
148 # "{join(map(nodeshort, successors), ', '}" in template, manually 164 # "{join(map(nodeshort, successors), ', '}" in template, manually
149 # create a correct textual representation 165 # create a correct textual representation