============================ Hg ============================ .. contents:: Introduction ---------------------------- 版本控制工具有很多,比如SVN,Git 和 Hg。分类上,有集中式版本管理和分布式版本管理。对比上SVN的龟速,hg显得很快和方便。对于Git,由于没有用过,不做过多记录。 Download and install ---------------------------- Go to here and download hg: http://mercurial.selenic.com/downloads/ Common commands ---------------------------- Here will list the common commands. .. code-block:: bash hg init ##创建一个空的仓库 hg clone ##搭建一个仓库的副本 hg commit ##提交改动 hg commit -m "Initial commit" ##提交改动的注释 hg revert ##撤销改动 hg pull ##下载更新到本地仓库 hg update ##更新本地仓库 hg push ##提交commit hg merge ##合并改动 hg status ##查看当前仓库状态 hg log ##日志 hg log -r1 ##查看版本号1的log hg diff ##版本对比 Reference ---------------------------- #. http://liluo.org/2010/11/%E5%AD%A6%E4%B9%A0hgmercurial%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6/ #. http://code.google.com/p/support/wiki/DVCSAnalysis #. http://hginit.com/01.html