##// END OF EJS Templates
obsolete: clarify documentation for succcessorssets
Sean Farley -
r20277:c05b968d default
parent child Browse files
Show More
@@ -509,29 +509,41 b' def foreground(repo, nodes):'
509 def successorssets(repo, initialnode, cache=None):
509 def successorssets(repo, initialnode, cache=None):
510 """Return all set of successors of initial nodes
510 """Return all set of successors of initial nodes
511
511
512 Successors set of changeset A are a group of revision that succeed A. It
512 The successors set of a changeset A are a group of revisions that succeed
513 succeed A as a consistent whole, each revision being only partial
513 A. It succeeds A as a consistent whole, each revision being only a partial
514 replacement. Successors set contains non-obsolete changeset only.
514 replacement. The successors set contains non-obsolete changesets only.
515
515
516 In most cases a changeset A have zero (changeset pruned) or a single
516 This function returns the full list of successor sets which is why it
517 successors set that contains a single successor (changeset A replaced by
517 returns a list of tuples and not just a single tuple. Each tuple is a valid
518 A')
518 successors set. Not that (A,) may be a valid successors set for changeset A
519 (see below).
519
520
520 When changeset is split, it results successors set containing more than
521 In most cases, a changeset A will have a single element (e.g. the changeset
521 a single element. Divergent rewriting will result in multiple successors
522 A is replaced by A') in its successors set. Though, it is also common for a
522 sets.
523 changeset A to have no elements in its successor set (e.g. the changeset
524 has been pruned). Therefore, the returned list of successors sets will be
525 [(A',)] or [], respectively.
523
526
524 They are returned as a list of tuples containing all valid successors sets.
527 When a changeset A is split into A' and B', however, it will result in a
528 successors set containing more than a single element, i.e. [(A',B')].
529 Divergent changesets will result in multiple successors sets, i.e. [(A',),
530 (A'')].
525
531
526 Final successors unknown locally are considered plain prune (obsoleted
532 If a changeset A is not obsolete, then it will conceptually have no
527 without successors).
533 successors set. To distinguish this from a pruned changeset, the successor
534 set will only contain itself, i.e. [(A,)].
528
535
529 The optional `cache` parameter is a dictionary that may contains
536 Finally, successors unknown locally are considered to be pruned (obsoleted
530 precomputed successors sets. It is meant to reuse the computation of
537 without any successors).
531 previous call to `successorssets` when multiple calls are made at the same
538
532 time. The cache dictionary is updated in place. The caller is responsible
539 The optional `cache` parameter is a dictionary that may contain precomputed
533 for its live spawn. Code that makes multiple calls to `successorssets`
540 successors sets. It is meant to reuse the computation of a previous call to
534 *must* use this cache mechanism or suffer terrible performances."""
541 `successorssets` when multiple calls are made at the same time. The cache
542 dictionary is updated in place. The caller is responsible for its live
543 spawn. Code that makes multiple calls to `successorssets` *must* use this
544 cache mechanism or suffer terrible performances.
545
546 """
535
547
536 succmarkers = repo.obsstore.successors
548 succmarkers = repo.obsstore.successors
537
549
General Comments 0
You need to be logged in to leave comments. Login now