##// END OF EJS Templates
obsstore: keep track of children information...
Pierre-Yves David -
r22270:e5adb693 default
parent child Browse files
Show More
@@ -265,6 +265,7 b' class obsstore(object):'
265 Markers can be accessed with two mappings:
265 Markers can be accessed with two mappings:
266 - precursors[x] -> set(markers on precursors edges of x)
266 - precursors[x] -> set(markers on precursors edges of x)
267 - successors[x] -> set(markers on successors edges of x)
267 - successors[x] -> set(markers on successors edges of x)
268 - children[x] -> set(markers on precursors edges of children(x)
268 """
269 """
269
270
270 fields = ('prec', 'succs', 'flag', 'meta', 'date', 'parents')
271 fields = ('prec', 'succs', 'flag', 'meta', 'date', 'parents')
@@ -282,6 +283,7 b' class obsstore(object):'
282 self._all = []
283 self._all = []
283 self.precursors = {}
284 self.precursors = {}
284 self.successors = {}
285 self.successors = {}
286 self.children = {}
285 self.sopener = sopener
287 self.sopener = sopener
286 data = sopener.tryread('obsstore')
288 data = sopener.tryread('obsstore')
287 if data:
289 if data:
@@ -376,6 +378,10 b' class obsstore(object):'
376 self.successors.setdefault(pre, set()).add(mark)
378 self.successors.setdefault(pre, set()).add(mark)
377 for suc in sucs:
379 for suc in sucs:
378 self.precursors.setdefault(suc, set()).add(mark)
380 self.precursors.setdefault(suc, set()).add(mark)
381 parents = mark[5]
382 if parents is not None:
383 for p in parents:
384 self.children.setdefault(p, set()).add(mark)
379 if node.nullid in self.precursors:
385 if node.nullid in self.precursors:
380 raise util.Abort(_('bad obsolescence marker detected: '
386 raise util.Abort(_('bad obsolescence marker detected: '
381 'invalid successors nullid'))
387 'invalid successors nullid'))
General Comments 0
You need to be logged in to leave comments. Login now