comparison mercurial/obsutil.py @ 33272:df90f4d6c609

obsolete: small doc update for 'successorssets' Clarify successorssets documentation before we start updating the main function. This patch serie will introduce the successorssets template, the opposite of predecessor templates. Successors will use successorssets function and requires some improvement so before doing that, we clean up successorssets a bit.
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 13:47:24 +0200
parents 53b3a1968aa6
children 68f3e819d41d
comparison
equal deleted inserted replaced
33271:02299a28ba34 33272:df90f4d6c609
336 336
337 If a changeset A is not obsolete, then it will conceptually have no 337 If a changeset A is not obsolete, then it will conceptually have no
338 successors set. To distinguish this from a pruned changeset, the successor 338 successors set. To distinguish this from a pruned changeset, the successor
339 set will contain itself only, i.e. [(A,)]. 339 set will contain itself only, i.e. [(A,)].
340 340
341 Finally, successors unknown locally are considered to be pruned (obsoleted 341 Finally, final successors unknown locally are considered to be pruned
342 without any successors). 342 (pruned: obsoleted without any successors). (Final: successors not affected
343 343 by markers).
344 The optional `cache` parameter is a dictionary that may contain precomputed 344
345 successors sets. It is meant to reuse the computation of a previous call to 345 The optional `cache` parameter is a dictionary that may contains
346 `successorssets` when multiple calls are made at the same time. The cache 346 precomputed successors sets. It is meant to reuse the computation of a
347 dictionary is updated in place. The caller is responsible for its life 347 previous call to `successorssets` when multiple calls are made at the same
348 span. Code that makes multiple calls to `successorssets` *must* use this 348 time. The cache dictionary is updated in place. The caller is responsible
349 cache mechanism or suffer terrible performance. 349 for its life span. Code that makes multiple calls to `successorssets`
350 *should* use this cache mechanism or risk a performance hit.
350 """ 351 """
351 352
352 succmarkers = repo.obsstore.successors 353 succmarkers = repo.obsstore.successors
353 354
354 # Stack of nodes we search successors sets for 355 # Stack of nodes we search successors sets for