2013-03-15 68 views
0

目前我正在嘗試獲取正在運行的遠程Subversion存儲庫的克隆。遠程存儲庫僅在非常慢的鏈接上可用,所以我使用svnsync創建了本地Subversion存儲庫。近三十個小時後,我現在擁有Subversion版本庫的本地副本。如何使用hgsvn從本地(file:///)SVN倉庫進行克隆?

我該如何將其克隆到新的mercurial存儲庫?問題是,無論是使用file:///以下形式出現的工作:

$ hg clone svn+file:///home/user/repo repo.hg 
abort: repository svn+file:///home/user/repo not found! 
$ hg clone file+svn:///home/user/repo repo.hg 
abort: repository file+svn:///home/user/repo not found! 
$ hg clone file:///home/user/repo repo.hg 
abort: repository /home/user/repo not found! 

相反svn info file:///home/user/repo給我的信息,並證明有在那個地方適當的顛覆庫。 svn://顯然沒有意義,因爲我沒有在本地運行服務器。

我也試過:

$ hgimportsvn file:///home/user/repo repo.hg 
SVN branch isn't a copy 
Finished! You can now pull all SVN history with 'hgpullsvn'. 

hgpullsvn只成功了上半場打的修改,然後出現了錯誤:

Interrupted, please wait for cleanup! 

External program failed (return code 1): hg '--encoding' 'utf-8' 'remove' '-A' 'branches/Company/CVSROOT' 
branches/Company/CVSROOT: No such file or directory 

(該CVSROOT從以前的轉換莖顛覆從CVS,顯然,這是在我的時間之前。)

是否hgsvn不明白file:///協議說明符,即使我試圖強制它與svn+file:///

注:之前我曾嘗試通過hghgsvn進行克隆,但最終在通過hgsvn進行同步之後經過一段時間後出現錯誤。因爲克隆整個歷史需要很長時間,所以我通過hgsvn與本地Subversion版本庫副本一起進行克隆,就像我以前在遠程版本中那樣。

回答

3

就認爲:只有「SVN +」前綴將是有益的:不要從2010年使用hgsvn,其「處於維護模式」,hgsubversion擴展添加到水銀和克隆它Subversion版本庫

PS對於http服務的存儲庫(因爲您可以使用http://用於Subversion,Mercurial,Git)。本地顛覆回購(克隆與hgsubversion)將文件:///

+0

等一下,'hgsvn'和'hgsubversion'有區別。哇。直到現在,這個事實完全避開了我。 +1爲現在的答案。我將不得不首先用替代擴展來測試它。是的,我知道'svn +'是用來消除歧義的,儘管這對本地回購也是有意義的。 – 0xC0000022L 2013-03-16 14:24:54

+0

作品,謝謝。我只是沒有意識到這是兩個不同的項目。 – 0xC0000022L 2013-03-18 11:19:27

1

我再次遇到這個問題。這是錯誤配置或未安裝hgsubversion擴展的一個症狀。

請確保您在.hgrcMercurial.ini(全局或本地)中有適當的行,如on the documentation site for HgSubversion所示。實例(如需要調整的路徑):

[extensions] 
hgsubversion = ~/hgsubversion/hgsubversion 

然後檢查:

hg help hgsubversion 
hg help subversion 

我的猜測是,如果沒有擴展汞柱根本不知道預期的文件夾中什麼等等需要一個Mercurial回購,它無法找到。

在我的情況下,這是通過覆蓋本地~/.hgrc再次導致