##// END OF EJS Templates
bookmarks: clear active bookmark on non-linear update
Matt Mackall -
r25789:95dc4b00 default
parent child Browse files
Show More
@@ -6483,6 +6483,11 b' def update(ui, repo, node=None, rev=None'
6483 6483 if not ret and movemarkfrom:
6484 6484 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
6485 6485 ui.status(_("updating bookmark %s\n") % repo._activebookmark)
6486 else:
6487 # this can happen with a non-linear update
6488 ui.status(_("(leaving bookmark %s)\n") %
6489 repo._activebookmark)
6490 bookmarks.deactivate(repo)
6486 6491 elif brev in repo._bookmarks:
6487 6492 bookmarks.activate(repo, brev)
6488 6493 ui.status(_("(activating bookmark %s)\n") % brev)
@@ -673,6 +673,31 b' tipmost surviving ancestor of the stripp'
673 673 date: Thu Jan 01 00:00:00 1970 +0000
674 674 summary: 0
675 675
676 test non-linear update not clearing active bookmark
677
678 $ hg up 1
679 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
680 (leaving bookmark four)
681 $ hg book drop
682 $ hg up -C
683 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
684 (leaving bookmark drop)
685 $ hg sum
686 parent: 2:db815d6d32e6
687 2
688 branch: default
689 bookmarks: should-end-on-two
690 commit: 2 unknown (clean)
691 update: 1 new changesets, 2 branch heads (merge)
692 phases: 4 draft
693 $ hg book
694 drop 1:925d80f479bb
695 four 3:9ba5f110a0b3
696 should-end-on-two 2:db815d6d32e6
697 $ hg book -d drop
698 $ hg up four
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
700 (activating bookmark four)
676 701
677 702 test clearing divergent bookmarks of linear ancestors
678 703
General Comments 0
You need to be logged in to leave comments. Login now