2

我想從a Subversion repository to Mercurial導入源代碼。我用它導入了Hg Subversion。問題是,SVN回購的佈局是默認的 - trunk目錄,分支在branches目錄等等 - 今天,但它不是那麼早。前段時間,該項目的所有目錄都是根存儲庫,因此Hg Subversion無法將branches目錄轉換爲Mercurial分支,而新的Mercurial存儲庫僅包含目錄branchestrunk導入Subversion版本庫現在已經很好地形成了,但之前沒有很好的形成

我轉換的分支目錄到水銀分支 「硬辦法」:

  • 每個分支b
  • hg mv branches/$b .
  • hg rm branches trunk
  • hg branch $b
  • hg commint -m "Creating branch $b"

但是,我想知道:有沒有更好的方法來做到這一點?你會如何解決這個問題?

回答

0

hgsubversion應該已經自動檢測到trunk/tags/branches目錄的存在,並完成了智能化的事情。你是不是強迫hgsubversion進入非自動模式來讓它不這麼做?

0
$ hg help convert 

The filemap is a file that allows filtering and remapping of files and 
directories. Each line can contain one of the following directives: 

    include path/to/file-or-dir 

    exclude path/to/file-or-dir 

    rename path/to/source path/to/destination <== YOUR CASE 

--filemap FILE  remap file names using contents of file 
相關問題