atom feed2 messages in com.selenic.mercurial-devel[PATCH] clone: update to @ bookmark i...
FromSent OnAttachments
Kevin BullockMay 15, 2012 1:52 pm 
Matt MackallMay 17, 2012 8:34 am 
Subject:[PATCH] clone: update to @ bookmark if it exists
From:Kevin Bullock (kbul@ringworld.org)
Date:May 15, 2012 1:52:56 pm
List:com.selenic.mercurial-devel

diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -387,7 +387,7 @@ def clone(ui, peeropts, source, dest=Non checkout = update if srcrepo.local(): checkout = srcrepo.lookup(update) - for test in (checkout, 'default', 'tip'): + for test in (checkout, '@', 'default', 'tip'): if test is None: continue try: diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -458,3 +458,13 @@ iterable in addbranchrevs() updating to branch stable 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ 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