Show More
@@ -684,6 +684,28 b' def _computebumpedset(repo):' | |||||
684 | query = '%ld - obsolete() - public()' |
|
684 | query = '%ld - obsolete() - public()' | |
685 | return set(repo.revs(query, _knownrevs(repo, successors))) |
|
685 | return set(repo.revs(query, _knownrevs(repo, successors))) | |
686 |
|
686 | |||
|
687 | @cachefor('divergent') | |||
|
688 | def _computedivergentset(repo): | |||
|
689 | """the set of rev that compete to be the final successors of some revision. | |||
|
690 | """ | |||
|
691 | divergent = set() | |||
|
692 | obsstore = repo.obsstore | |||
|
693 | newermap = {} | |||
|
694 | for ctx in repo.set('(not public()) - obsolete()'): | |||
|
695 | mark = obsstore.precursors.get(ctx.node(), ()) | |||
|
696 | toprocess = set(mark) | |||
|
697 | while toprocess: | |||
|
698 | prec = toprocess.pop()[0] | |||
|
699 | if prec not in newermap: | |||
|
700 | successorssets(repo, prec, newermap) | |||
|
701 | newer = [n for n in newermap[prec] if n] | |||
|
702 | if len(newer) > 1: | |||
|
703 | divergent.add(ctx.rev()) | |||
|
704 | break | |||
|
705 | toprocess.update(obsstore.precursors.get(prec, ())) | |||
|
706 | return divergent | |||
|
707 | ||||
|
708 | ||||
687 | def createmarkers(repo, relations, flag=0, metadata=None): |
|
709 | def createmarkers(repo, relations, flag=0, metadata=None): | |
688 | """Add obsolete markers between changesets in a repo |
|
710 | """Add obsolete markers between changesets in a repo | |
689 |
|
711 |
General Comments 0
You need to be logged in to leave comments.
Login now