$ hg init test $ cd test $ echo a > a $ hg ci -Ama a $ echo b > b $ hg ci -Amb b $ hg bookmark -r '.^' -f default $ cd ../ $ hg clone test test2 $ hg -R test2 log -r changeset: 0:9059a54cfb1f bookmark: default user: David Soria Parra <dsp@php.net> date: Tue Oct 23 18:39:29 2012 +0200 summary: a it's caused by mercurial/hg.py:412. We are doing a lookup in default. As bookmarks are checked before branches, this causes the bug to be triggered and default bm is choosen instead of the branch tip.
The problem can be created without using hg bookmark -f, too: hg init foo cd foo hg branch bar hg ci -m bar hg bookmark default
Additionally a branch named "@" will be checked out by automatically. I have a fix for this and will push it to stable after writing tests for all cases.
just pushed: changeset: 17867:c9339efed653 branch: stable user: Thomas Arendsen Hein <thomas@intevation.de> date: Fri Oct 26 12:36:15 2012 +0200 summary: clone: make sure to use "@" as bookmark and "default" as branch (issue3677) changeset: 17868:04755508f8ed branch: stable user: Thomas Arendsen Hein <thomas@intevation.de> date: Fri Oct 26 13:09:55 2012 +0200 summary: test-bookmarks.t: check that bookmark "default" is not automatically checked out changeset: 17869:c79b404b99ae branch: stable bookmark: @ bookmark: crew-stable tag: tip user: Thomas Arendsen Hein <thomas@intevation.de> date: Fri Oct 26 13:20:44 2012 +0200 summary: test-clone.t: check that branch "@" is not automatically checked out