Problem of hg clone src#tag dest
mercurial
Solution
Due to the design of Mercurial tags, the tagged revision does not contain that tag. In other words, 1.0 doesn't "know" it's 1.0.
Mercurial recommends the solution you give at the end. A possible mitigation for the performance issues is to keep (pulling as needed) a single clone of master that you don't modify. Then, (as needed) clone that locally and update to the desired version. The clone will (assuming same volume and a modern filesystem) use hard links, minimizing the required copying.
Problem
I have a repository named master which keeps product releases. It has several tags (such as 1.0,2.0,3.0) as baseline. When I want to create hot fix for one version, for example 1.0. I use command as following: ``` hg clone master#1.0 hotfix_1.0.1 cd hotfix_1.0.1 hg tip changeset: 14:b2492c2611a1 tag: tip user: codingboy <codingboy@gmail.com> date: Thu Dec 09 14:03:23 2010 +0800 summary: fix bug4 ``` I find tip version is what I need, but is not tagged with 1.0. It will cause my changes in hotfix_1.0.1 can not be push to master. the error is ``` (abort) unknown 1.0 revision. ``` I check master repository. the log shows below ``` changeset: 15:3497c46cbc7f tag: tip user: codingboy <codingboy@gmail.com> date: Thu Dec 09 14:03:27 2010 +0800 summary: Added tag 1.0 for changeset b2492c2611a1 changeset: 14:b2492c2611a1 tag: 1.0 user: codingboy <codingboy@gmail.com> date: Thu Dec 09 14:03:23 2010 +0800 summary: fix bug4 ``` so it seems cloned repository lost changset#15. My understanding is hg clone src#tag dest should clone tag which I need. But this operation can not clone child of changeset#14 which is do tagging. So what I have done is to use command ``` hg clone master hotfix_1.0.1 -u 1.0 ``` I do not like this command. if master repository is huge and I just want to fix old version, It will waste time to clone and push changes. Do I have any other approach to clone one repository from one baseline or tag correctly? thanks...