[PATCH 1 of 1 RFC stable] clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein
thomas at intevation.de
Tue Oct 2 02:30:09 CDT 2012
# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Date 1349162802 -7200
# Node ID bd5f8e02e3669706af246147dc149dc8065fabe5
# Parent fa714f3ed2989aff64c267c9935251d9fc4f31ee
clone: activate bookmark specified with --updaterev
diff -r fa714f3ed298 -r bd5f8e02e366 mercurial/hg.py
--- a/mercurial/hg.py Mon Oct 01 23:05:02 2012 -0500
+++ b/mercurial/hg.py Tue Oct 02 09:26:42 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:
diff -r fa714f3ed298 -r bd5f8e02e366 tests/test-bookmarks.t
--- a/tests/test-bookmarks.t Mon Oct 01 23:05:02 2012 -0500
+++ b/tests/test-bookmarks.t Tue Oct 02 09:26:42 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
More information about the Mercurial-devel
mailing list