January 11, 2008 at 12:02 am
· Filed under programming
這篇內容滿雜的,所以才會有這麼亂的標題…
首先,前天打算把一個 mercurial repo 轉成 git repo,所以上 Google 拜了一下,在這裡找到工具。我是用 fast-export.git 轉,用起來很棒,完全無痛。
再來,原本在 hg 下面我都用 meld 來協助做 merge (只要將 HGMERGE 這個環境變數設成想用的工具即可),換了 git 呢? 答案在這裡,用 git-mergetool 並指定使用的工具。
最後,如果一起開發的同伴有人使用 windows,因為 git 以前沒有辦法在 win32 上面跑很很好,SCM 只能放棄用 git。不過,現在情況改觀了。MinGW port of GIT 將 git porting 到 win32 平台上(據說正在進行 merge 到 official git 中),而 Git on MSys 則提供了一個方便的安裝方式。有興趣的朋友可以試看看。
Permalink
November 4, 2007 at 1:32 pm
· Filed under programming
前幾天在更新系統時,mercurial 升級為 0.9.5-1,而且多了一個對我來說佷好用的 extension: imerge。
因為一些原因,我的某個 hg repo 和 upstream 有相當大的差異,每次 pull 後的 merge 真是要命,偏偏 merge 得一次做完,所以,做不完的話只好讓 meld 視窗一直掛在那裡。
現在有了 imerge,日子輕鬆多了。imerge 將 merge 切成以檔案為單位,開始時,imerge 會先記錄哪些檔案需要 merge,之後,再由使用者自己決定順序,一次選一個檔案 merge。當所有的檔案都 merge 完後,整個 imerge 的過程即告完成。
imerge 還以可直接標記檔案為 resolved/unresolved 以及將 merge 狀態存到記錄檔中,詳情可以參考 imerge 的 help。
Permalink
June 28, 2007 at 1:05 am
· Filed under programming
I have set up a mercurial publish server for a group recently. All members in this group use Windows.
The server is accessed via ssh, and the ssh server listen on a port other than 22. With google’s help, I found a lot of documents about how to setup mercurial with putty (plink). But things go wrong when you’re not using port 22…
Openssh uses “-p” to specify server port to connect to, but plink uses “-P” instead. Mercurial fails with
remote: plink: unknown option “-p”
when it invokes ssh.
With a small modification, mercurial should work fine with plink. Or you can specify the server port in mercurial.ini instead of in URL.
Permalink