Commits

Thomas Arendsen Hein committed 52c7e17

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.

  • Participants
  • Parent commits 7d2dd10
  • Branches stable

Comments (0)

Files changed (4)

File mercurial/hg.py

                 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

File tests/test-bookmarks-pushpull.t

   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
   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

File tests/test-bookmarks.t

   $ 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
   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
   $ 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

File tests/test-clone.t

   $ 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