diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -7121,8 +7121,9 @@ def update(ui, repo, node=None, rev=None 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) - 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 --- a/tests/test-bookmarks-current.t +++ b/tests/test-bookmarks-current.t @@ -22,9 +22,10 @@ list bookmarks with color update to bookmark X + $ hg bookmarks + * X -1:000000000000 $ 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 --- a/tests/test-bookmarks.t +++ b/tests/test-bookmarks.t @@ -599,7 +599,6 @@ pull --update works the same as pull && $ 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 @@ We warn about divergent during bare upda $ 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,9 +736,11 @@ tipmost surviving ancestor of the stripp 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 - (activating bookmark four) $ hg up 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg sum