一. 介紹
Mercuial與傳統的版本控制系統最大不同在於使用分布式的管理。所謂分布式,就是指沒有一個所謂的集中的中心(central)庫,這個庫一般由svn server(svn),vss administrator(vss)控制,而Mercuial沒有這樣一個庫,在本地建庫,直接就使用,任何一個庫都可以作為中心庫。每個庫都看成是平等的。
二. 好處
分布式最大的好處就是離線工作,這就意味著不連網就可以享受版本控制的好處,普通的提交速度也會快很多,以前集中式的版本控制系統,每次提交都會影響到其他人,以至於不能提交未經測試的版本;而使用分布式的版本控制系統時,你可以隨便提交,安全地保護自己的成果,預防意外,也可以隨便在本地clone和分支,哈哈,這樣不會像其他的控制系統一樣造成混亂,mercurial本地就是一個完整的版本控制系統。直到修正到最終版本後才push(相當於集中式版本控制的commit)到真正的一個公用庫上去。
如果想要將自己的工作成果share出去的時候,只用一條普通的push命令,就像遠方的伺服器一直搭建好了一樣。
三。安裝
安裝,官方有說明的,我在這裡copy過來,
How can I download the plugin? (在eclipse安裝外掛程式)
You can get the plugin easily using the Eclipse Update Manager, just click Help → Software Updates in Eclipse. The Eclipse Update Site for MercurialEclipse is available at this URL:
http://cbes.javaforge.com/update(輸入這個地址)
If you are not familiar with getting new software and updates to Eclipse, please read this article.
Important note for users of previous HgEclipse versions: if you have HgEclipse already installed on your Eclipse, please explicitely uninstall HgEclipse before installing MercurialEclipse 1.6.0. (This is necessary due to the plugin naming changes.) It's easy: in Eclipse, click (按照這個步驟來)Help → About → Installation Details → select HgEclipse → click Uninstall and confirm everything. Now you can install MercurialEclipse 1.6.0.
If you have trouble using the update site then you can download the plugin jars and install manually from here: plugin directory
How can I get the source source code? (擷取原始碼)
Read here more about checking out source code from a JavaForge repository and see this page for the clone URL. If you are already registered and are in a hurry, then run this Mercurial command and login with your JavaForge username and password:
hg clone(輸入這個地址) http://javaforge.com/hg/hgeclipse