changeset 17871:52c7e171e355 stable

clone: print bookmark name when clone activates a bookmark Similar to the message that prints the checked out branch name. Without this, the user might accidentally move the @ bookmark.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 26 Oct 2012 14:53:31 +0200
parents 7d2dd10ce9ea
children 7d4e98bf114d
files mercurial/hg.py tests/test-bookmarks-pushpull.t tests/test-bookmarks.t tests/test-clone.t
diffstat 4 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Fri Oct 26 14:37:03 2012 +0200
+++ b/mercurial/hg.py	Fri Oct 26 14:53:31 2012 +0200
@@ -428,6 +428,7 @@
                 destrepo.ui.status(_("updating to branch %s\n") % bn)
                 _update(destrepo, uprev)
                 if update in destrepo._bookmarks:
+                    destrepo.ui.status(_("active bookmark: %s\n") % update)
                     bookmarks.setcurrent(destrepo, update)
 
         return srcpeer, destpeer
--- a/tests/test-bookmarks-pushpull.t	Fri Oct 26 14:37:03 2012 +0200
+++ b/tests/test-bookmarks-pushpull.t	Fri Oct 26 14:53:31 2012 +0200
@@ -337,6 +337,7 @@
   added 5 changesets with 5 changes to 3 files (+2 heads)
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: @
   $ hg -R cloned-bookmarks bookmarks
    * @                         1:9b140be10808
      X                         1:9b140be10808
@@ -357,6 +358,7 @@
   added 5 changesets with 5 changes to 3 files (+2 heads)
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: @
   $ cd addmarks
   $ echo foo > foo
   $ hg add foo
--- a/tests/test-bookmarks.t	Fri Oct 26 14:37:03 2012 +0200
+++ b/tests/test-bookmarks.t	Fri Oct 26 14:53:31 2012 +0200
@@ -365,6 +365,7 @@
   $ hg clone . cloned-bookmarks
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: @
   $ hg -R cloned-bookmarks bookmarks
    * @                         2:db815d6d32e6
      X2                        1:925d80f479bb
@@ -383,6 +384,7 @@
   added 3 changesets with 3 changes to 3 files (+1 heads)
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: @
   $ hg -R cloned-bookmarks-pull bookmarks
    * @                         2:db815d6d32e6
      X2                        1:925d80f479bb
@@ -427,6 +429,7 @@
   $ hg clone -u Z . cloned-bookmarks-update
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: Z
   $ hg -R cloned-bookmarks-update bookmarks
      X2                        1:925d80f479bb
      Y                         2:db815d6d32e6
--- a/tests/test-clone.t	Fri Oct 26 14:37:03 2012 +0200
+++ b/tests/test-clone.t	Fri Oct 26 14:53:31 2012 +0200
@@ -509,6 +509,7 @@
   $ hg clone . ../i
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  active bookmark: @
   $ hg id -i ../i
   a7949464abda