[PATCH 1 of 3] clone: update to @ bookmark if it exists
Augie Fackler
raf at durin42.com
Fri Jul 6 19:16:35 UTC 2012
# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1332366819 18000
# Node ID 7cde29762eb10651860ecb2497b642880020f446
# Parent 01d847e0fdc9578ae2f94b42291bcb6a6e5bf89e
clone: update to @ bookmark if it exists
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -387,7 +387,7 @@
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
@@ -465,6 +465,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
More information about the Mercurial-devel
mailing list