Show More
@@ -591,14 +591,13 b' def cleanupnodes(repo, mapping, operatio' | |||||
591 | with repo.transaction('cleanup') as tr: |
|
591 | with repo.transaction('cleanup') as tr: | |
592 | # Move bookmarks |
|
592 | # Move bookmarks | |
593 | bmarks = repo._bookmarks |
|
593 | bmarks = repo._bookmarks | |
594 |
bmarkchange |
|
594 | bmarkchanges = [] | |
595 | allnewnodes = [n for ns in mapping.values() for n in ns] |
|
595 | allnewnodes = [n for ns in mapping.values() for n in ns] | |
596 | for oldnode, newnodes in mapping.items(): |
|
596 | for oldnode, newnodes in mapping.items(): | |
597 | oldbmarks = repo.nodebookmarks(oldnode) |
|
597 | oldbmarks = repo.nodebookmarks(oldnode) | |
598 | if not oldbmarks: |
|
598 | if not oldbmarks: | |
599 | continue |
|
599 | continue | |
600 | from . import bookmarks # avoid import cycle |
|
600 | from . import bookmarks # avoid import cycle | |
601 | bmarkchanged = True |
|
|||
602 | if len(newnodes) > 1: |
|
601 | if len(newnodes) > 1: | |
603 | # usually a split, take the one with biggest rev number |
|
602 | # usually a split, take the one with biggest rev number | |
604 | newnode = next(repo.set('max(%ln)', newnodes)).node() |
|
603 | newnode = next(repo.set('max(%ln)', newnodes)).node() | |
@@ -619,10 +618,12 b' def cleanupnodes(repo, mapping, operatio' | |||||
619 | allnewnodes, newnode, oldnode) |
|
618 | allnewnodes, newnode, oldnode) | |
620 | deletenodes = _containsnode(repo, deleterevs) |
|
619 | deletenodes = _containsnode(repo, deleterevs) | |
621 | for name in oldbmarks: |
|
620 | for name in oldbmarks: | |
622 |
bmark |
|
621 | bmarkchanges.append((name, newnode)) | |
623 |
bookmarks. |
|
622 | for b in bookmarks.divergent2delete(repo, deletenodes, name): | |
624 | if bmarkchanged: |
|
623 | bmarkchanges.append((b, None)) | |
625 | bmarks.recordchange(tr) |
|
624 | ||
|
625 | if bmarkchanges: | |||
|
626 | bmarks.applychanges(repo, tr, bmarkchanges) | |||
626 |
|
627 | |||
627 | # Obsolete or strip nodes |
|
628 | # Obsolete or strip nodes | |
628 | if obsolete.isenabled(repo, obsolete.createmarkersopt): |
|
629 | if obsolete.isenabled(repo, obsolete.createmarkersopt): |
General Comments 0
You need to be logged in to leave comments.
Login now