Show More
@@ -816,6 +816,11 b' def bookmark(ui, repo, mark=None, rev=No' | |||
|
816 | 816 | return |
|
817 | 817 | anc = repo.changelog.ancestors([repo[target].rev()]) |
|
818 | 818 | bmctx = repo[marks[mark]] |
|
819 | divs = [repo[b].node() for b in marks | |
|
820 | if b.split('@', 1)[0] == mark.split('@', 1)[0]] | |
|
821 | deletefrom = [b for b in divs | |
|
822 | if repo[b].rev() in anc or b == target] | |
|
823 | bookmarks.deletedivergent(repo, deletefrom, mark) | |
|
819 | 824 | if bmctx.rev() in anc: |
|
820 | 825 | ui.status(_("moving bookmark '%s' forward from %s\n") % |
|
821 | 826 | (mark, short(bmctx.node()))) |
@@ -590,3 +590,24 b' tipmost surviving ancestor of the stripp' | |||
|
590 | 590 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
591 | 591 | summary: 0 |
|
592 | 592 | |
|
593 | ||
|
594 | test clearing divergent bookmarks of linear ancestors | |
|
595 | ||
|
596 | $ hg bookmark Z -r 0 | |
|
597 | $ hg bookmark Z@1 -r 1 | |
|
598 | $ hg bookmark Z@2 -r 2 | |
|
599 | $ hg bookmark Z@3 -r 3 | |
|
600 | $ hg book | |
|
601 | Z 0:f7b1eb17ad24 | |
|
602 | Z@1 1:925d80f479bb | |
|
603 | Z@2 2:db815d6d32e6 | |
|
604 | * Z@3 3:9ba5f110a0b3 | |
|
605 | four 3:9ba5f110a0b3 | |
|
606 | should-end-on-two 2:db815d6d32e6 | |
|
607 | $ hg bookmark Z | |
|
608 | moving bookmark 'Z' forward from f7b1eb17ad24 | |
|
609 | $ hg book | |
|
610 | * Z 3:9ba5f110a0b3 | |
|
611 | Z@1 1:925d80f479bb | |
|
612 | four 3:9ba5f110a0b3 | |
|
613 | should-end-on-two 2:db815d6d32e6 |
General Comments 0
You need to be logged in to leave comments.
Login now