回購無需安裝額外的服務器端軟件,您的團隊將需要SSH賬戶那個盒子。我假設你有一個,並且你可以爲你的朋友創建它們。如果你沒有這個設置,你最好使用bitbucket,它是免費的,並提供了ssh和ftp訪問。
此外,你不會說如果你project2已經在Mercurial控制下,所以我假設它不是。
創建遠程回購你會做這樣的事本地計算機上:
hg init project3 # <-- creates a new empty respository
cp ALL_THE_PROJECT3_FILES_YOU_WANT project3 # <--- put the files you want into project3
cd project3 # <-- go into your local project3 repository
hg addremove # <-- LOCALLY add the files you copied in
hg commit -m "initial commit copied in project2" # <-- LOCALLY commit the files
cd .. # <---- go up a directory
hg clone project3 ssh://[email protected]//home/hg/repos/project3 # clone the repo over to the server
你的隊友就可以克隆下來使用:
hg clone ssh://[email protected]//home/hg/repos/project3
這裏有一些事情你可能會不小心弄到了這個工作的方式:
- 個你的朋友需要SSH佔
- 你的朋友的帳戶必須讀
/home/hg/repos
公告/寫訪問所有的克隆是發生在SSH。設置HTTP比較困難,可能不是你需要做的事情。
說真的,只是使用bitbucket。
mercurial-server不是Mercurial服務器。它甚至不是Mercurial服務器。這是一個第三方應用程序,它向ssh層添加了一些用戶管理內容,這是Mercurial本身支持的傳輸機制之一。它幾乎總是比援助造成更多的困惑。 – 2012-07-26 12:59:27
我刪除了你的apache標記,因爲我們只談論了ssh - 而不是apache。那(和hgweb.cgi)是別的。 – 2012-07-26 18:45:59