diff --git a/mercurial/commands.py b/mercurial/commands.py index 8b90367c4cf3892fd4bd092a320f77134beedc85_bWVyY3VyaWFsL2NvbW1hbmRzLnB5..2e1bceeea5204ef59e785093b8e5b6706ed146f4_bWVyY3VyaWFsL2NvbW1hbmRzLnB5 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -7121,4 +7121,6 @@ repo._activebookmark) bookmarks.deactivate(repo) elif brev in repo._bookmarks: + if brev != repo._activebookmark: + ui.status(_("(activating bookmark %s)\n") % brev) bookmarks.activate(repo, brev) @@ -7124,5 +7126,4 @@ bookmarks.activate(repo, brev) - ui.status(_("(activating bookmark %s)\n") % brev) elif brev: if repo._activebookmark: ui.status(_("(leaving bookmark %s)\n") % diff --git a/tests/test-bookmarks-current.t b/tests/test-bookmarks-current.t index 8b90367c4cf3892fd4bd092a320f77134beedc85_dGVzdHMvdGVzdC1ib29rbWFya3MtY3VycmVudC50..2e1bceeea5204ef59e785093b8e5b6706ed146f4_dGVzdHMvdGVzdC1ib29rbWFya3MtY3VycmVudC50 100644 --- a/tests/test-bookmarks-current.t +++ b/tests/test-bookmarks-current.t @@ -22,5 +22,7 @@ update to bookmark X + $ hg bookmarks + * X -1:000000000000 $ hg update X 0 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -25,6 +27,5 @@ $ hg update X 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - (activating bookmark X) list bookmarks diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t index 8b90367c4cf3892fd4bd092a320f77134beedc85_dGVzdHMvdGVzdC1ib29rbWFya3MudA==..2e1bceeea5204ef59e785093b8e5b6706ed146f4_dGVzdHMvdGVzdC1ib29rbWFya3MudA== 100644 --- a/tests/test-bookmarks.t +++ b/tests/test-bookmarks.t @@ -599,7 +599,6 @@ $ hg -R ../cloned-bookmarks-manual-update update updating to active bookmark Y 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (activating bookmark Y) (all in one version) @@ -643,7 +642,6 @@ $ hg -R ../cloned-bookmarks-manual-update-with-divergence update updating to active bookmark Y 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (activating bookmark Y) 1 other divergent bookmarks for "Y" test wrongly formated bookmark @@ -738,5 +736,8 @@ no-op update doesn't deactive bookmarks + $ hg bookmarks + * four 3:9ba5f110a0b3 + should-end-on-two 2:db815d6d32e6 $ hg up four 0 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -741,6 +742,5 @@ $ hg up four 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - (activating bookmark four) $ hg up 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg sum