# HG changeset patch # User Stephen Lee # Date 1362626276 -39600 # Node ID 10f15e34d86c57909ee58484ca9dc2b82053c399 # Parent f8515564d617e6e194f4284f4ebae9b1ca23ce2b update: show message when a bookmark is activated by update When updating to a bookmark, mention that the bookmark is now active. This is a reminder that update does not move the current bookmark if an explicit target is given - instead it activates that target. diff -r f8515564d617 -r 10f15e34d86c mercurial/commands.py --- a/mercurial/commands.py Tue Apr 22 10:01:22 2014 -0700 +++ b/mercurial/commands.py Thu Mar 07 14:17:56 2013 +1100 @@ -5889,6 +5889,7 @@ ui.status(_("updating bookmark %s\n") % repo._bookmarkcurrent) elif brev in repo._bookmarks: bookmarks.setcurrent(repo, brev) + ui.status(_("(activating bookmark %s)\n") % brev) elif brev: if repo._bookmarkcurrent: ui.status(_("(leaving bookmark %s)\n") % diff -r f8515564d617 -r 10f15e34d86c tests/test-bookmarks-current.t --- a/tests/test-bookmarks-current.t Tue Apr 22 10:01:22 2014 -0700 +++ b/tests/test-bookmarks-current.t Thu Mar 07 14:17:56 2013 +1100 @@ -24,6 +24,7 @@ $ hg update X 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark X) list bookmarks @@ -71,6 +72,7 @@ Verify that switching to Z updates the current bookmark: $ hg update Z 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + (activating bookmark Z) $ hg bookmark Y 0:719295282060 * Z -1:000000000000 @@ -78,6 +80,7 @@ Switch back to Y for the remaining tests in this file: $ hg update Y 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark Y) delete bookmarks @@ -152,6 +155,7 @@ $ hg bookmark X@2 -r 2 $ hg update X 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + (activating bookmark X) $ hg bookmarks * X 0:719295282060 X@1 1:cc586d725fbe diff -r f8515564d617 -r 10f15e34d86c tests/test-bookmarks-merge.t --- a/tests/test-bookmarks-merge.t Tue Apr 22 10:01:22 2014 -0700 +++ b/tests/test-bookmarks-merge.t Thu Mar 07 14:17:56 2013 +1100 @@ -65,6 +65,7 @@ $ hg up -C e 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + (activating bookmark e) $ hg merge abort: no matching bookmark to merge - please merge with an explicit rev or bookmark (run 'hg heads' to see all heads) @@ -99,6 +100,7 @@ $ hg up -C e 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + (activating bookmark e) $ hg bookmarks b 1:d2ae7f538514 c 3:b8f96cf4688b diff -r f8515564d617 -r 10f15e34d86c tests/test-bookmarks.t --- a/tests/test-bookmarks.t Tue Apr 22 10:01:22 2014 -0700 +++ b/tests/test-bookmarks.t Thu Mar 07 14:17:56 2013 +1100 @@ -118,6 +118,7 @@ $ hg update X 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + (activating bookmark X) $ echo c > c $ hg add c $ hg commit -m 2 @@ -501,6 +502,7 @@ $ hg update updating to active bookmark Z 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark Z) $ hg bookmarks X2 1:925d80f479bb Y 2:db815d6d32e6 @@ -513,6 +515,7 @@ moving bookmark 'Y' forward from db815d6d32e6 $ hg -R cloned-bookmarks-update update Y 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark Y) $ hg -R cloned-bookmarks-update pull --update . pulling from . searching for changes diff -r f8515564d617 -r 10f15e34d86c tests/test-strip.t --- a/tests/test-strip.t Tue Apr 22 10:01:22 2014 -0700 +++ b/tests/test-strip.t Thu Mar 07 14:17:56 2013 +1100 @@ -490,6 +490,7 @@ $ hg bookmark -r 'c' 'delete' $ hg up -C todelete 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark todelete) $ hg strip -B nostrip bookmark 'nostrip' deleted abort: empty revision set diff -r f8515564d617 -r 10f15e34d86c tests/test-subrepo-svn.t --- a/tests/test-subrepo-svn.t Tue Apr 22 10:01:22 2014 -0700 +++ b/tests/test-subrepo-svn.t Thu Mar 07 14:17:56 2013 +1100 @@ -482,6 +482,7 @@ A *obstruct/other (glob) Checked out revision 1. 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark other) This is surprising, but is also correct based on the current code: $ echo "updating should (maybe) fail" > obstruct/other