2010-07-08 47 views

回答

6
hg pull -u google_code_url 

-u表示自動更新您的工作副本。您可以設置(如果它尚不存在)一個默認的URL在.hg/hgrc文件:

[paths] 
default = pull_url 
default-push = push_url 

然後,你可以這樣做:

hg push 
hg pull -u 

當然,你還可以手動指定一個不同的位置。

+3

我還發現'hg summary --remote'非常有用 – 2010-07-08 02:11:04

+0

即使該存儲庫不是我在本地複製的位置?定期的項目是這樣的:http://code.google.com/p/someproject和我的「服務器」克隆是http://code.google.com/r/othername因此,如果我理解正確的話:'hg pull - 你http:// code.google.com/p/someproject'會更新我的本地項目嗎? – OscarRyz 2010-07-08 03:20:29

+0

@Oscar,是的,你可以從任何克隆中提取,如果有必要,它會提示你合併。 – 2010-07-08 03:27:16

相關問題