diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -409,7 +409,7 @@ def clone(ui, peeropts, source, dest=Non 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: diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -468,6 +468,16 @@ iterable in addbranchrevs() $ 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