changeset 17756:92980a8dfdfe

clone: update to @ bookmark if it exists
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 21 Mar 2012 16:53:39 -0500
parents bededd3f0735
children fec69c72e2b4
files mercurial/hg.py tests/test-clone.t
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Fri Aug 10 20:37:20 2012 +0100
+++ b/mercurial/hg.py	Wed Mar 21 16:53:39 2012 -0500
@@ -409,7 +409,7 @@
             if update:
                 if update is not True:
                     checkout = srcpeer.lookup(update)
-                for test in (checkout, 'default', 'tip'):
+                for test in (checkout, '@', 'default', 'tip'):
                     if test is None:
                         continue
                     try:
--- a/tests/test-clone.t	Fri Aug 10 20:37:20 2012 +0100
+++ b/tests/test-clone.t	Wed Mar 21 16:53:39 2012 -0500
@@ -468,6 +468,16 @@
   $ rm -r ua
 
 
+Test clone with special '@' bookmark:
+  $ cd a
+  $ hg bookmark -r a7949464abda @  # branch point of stable from default
+  $ hg clone . ../i
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg id -i ../i
+  a7949464abda
+
+
 Testing failures:
 
   $ mkdir fail