当我们clone下来代码后,默认会在某个default分支上。
hg clone your-src-url代码库克隆下来后,查看一下当前代码库的状态
14:30linc@Linc-Ubuntu:Demo$ hg summary parent: 2014:xxxxxxxxxxxxxxx This is a description. branch: default commit: 3 unknown (clean) update: (current)上述我们可以看到,最新的版本(changeset)是2014,当前的分支是default,已经update到最新。
14:42linc@Linc-Ubuntu:Demo$ hg branch default还可以查看parent的详细信息:
14:49linc@Linc-Ubuntu:Demo$ hg parents changeset: 2014:xxxxxxxxxxxxxxx user: Linc Yang <linc@csdn.net> date: Mon Nov 14 15:59:36 2014 +0800 summary: This is a description.再看看库中有几个分支:
14:42linc@Linc-Ubuntu:Demo$ hg branches cool_version 2089:xxxxxxxxxx default 2014:xxxxxxxxxx little_thing 1999:xxxxxxxxxx还有另两个分支,并且我们当前的default也不是最新的。我们变换到cool_version上去看看。
14:58linc@Linc-Ubuntu:Demo$ hg update cool_version 38 files updated, 10 files merged, 7 files removed, 0 files unresolved 14:58linc@Linc-Ubuntu:Demo$ hg branch cool_version 14:58linc@Linc-Ubuntu:Demo$ hg sum parent: 2089:xxxxxxxxxx tip This is my test version. branch: cool_version commit: 3 unknown (clean) update: (current)
原文地址:http://blog.csdn.net/lincyang/article/details/41250687