Mercurial思想研读系列文章——2. 深入HG管理机制
接下来按照http://mercurial.selenic.com/wiki/ChineseTutorial中文教程中的情况来介绍检查仓库历史来说明一下很重要的改变集的思想,这也是和SVN的区别,对于改变集提交与其他用户的仓库冲突时怎么处理是我现在最理解不清楚的地方。但是了解Mercurial管理机制后就迎刃而解了。
这里还是不要破坏原版来翻译成中文,只通过对官方的Understanding Mercurial做些标识来简单的了解HG的操作原理:
http://mercurial.selenic.com/wiki/UnderstandingMercurial?此为官方原文,这里已经做了粘贴。
?
我们都习惯拿到工具先上手用用,这就必须在较早的提到HG的一些良好的习惯,这里先提到一个HG的良好使用习惯,是从svn转变需要注意的
在 Mercurial 开发实践中一个好的做法是把每个变更隔离在各自的仓库里。这样可以避免把不相关的代码混杂起来, 并且便于一个接一个的测试每一部分工作。我们现在就开始采用这一模式。
给新的 仓库 命名了一个描述性 的名字,基本上是说明这个仓库的目的。 在Mercurial里面给一个仓库创建[克隆]很方便,我们会很快的积攒起很多稍微不同的仓库。如果我们不给他们描述性的命名, 很快就会没法分辨它们。
?
?
?
6. What Mercurial can't do(这里提到了HG不能做到的事情,也值得注意,更名明白HG的初衷,才能更好的使用)?
Many SVN/CVS users expect to host related projects together in one repository. This is really not what Mercurial was made for, so you should try a different way of working. In particular, this means that you cannot check out only one directory of a repository.
If you absolutely need to host multiple projects in a kind of meta-repository though, you could try the?Subrepositories?feature that was introduced with Mercurial 1.3 or the older?ForestExtension.
For a hands-on introduction to using Mercurial, see the?Tutorial.
?
?