merge with crew-stable
authorThomas Arendsen Hein <thomas@intevation.de>
Thu, 04 Oct 2012 10:11:17 +0200
changeset 17704 3d1a781b23c0
parent 17702 57fe5aca86af (current diff)
parent 17703 4a07d2ff7c66 (diff)
child 17706 70efdc22b188
merge with crew-stable
mercurial/hg.py
tests/test-bookmarks.t
--- a/mercurial/hg.py	Tue Oct 02 14:31:25 2012 -0700
+++ b/mercurial/hg.py	Thu Oct 04 10:11:17 2012 +0200
@@ -410,6 +410,8 @@
                 bn = destrepo[uprev].branch()
                 destrepo.ui.status(_("updating to branch %s\n") % bn)
                 _update(destrepo, uprev)
+                if update in destrepo._bookmarks:
+                    bookmarks.setcurrent(destrepo, update)
 
         return srcpeer, destpeer
     finally:
--- a/tests/test-bookmarks.t	Tue Oct 02 14:31:25 2012 -0700
+++ b/tests/test-bookmarks.t	Thu Oct 04 10:11:17 2012 +0200
@@ -349,6 +349,17 @@
   $ hg -R cloned-bookmarks-rev bookmarks
      X2                        1:925d80f479bb
 
+test clone with update to a bookmark
+
+  $ hg clone -u Z . cloned-bookmarks-update
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg -R cloned-bookmarks-update bookmarks
+     X2                        1:925d80f479bb
+     Y                         2:db815d6d32e6
+   * Z                         2:db815d6d32e6
+     x  y                      2:db815d6d32e6
+
 create bundle with two heads
 
   $ hg clone . tobundle