With TortoiseHG 2.0 this has been made
简单得多: 启动 TortoiseHG
从“开始”菜单中选择“工作台”
文件-> 设置。选择扩展名
从列表中。检查’转换’
复选框,然后单击“确定”。就是这样! 不
需要尝试生成配置
文件,并在文件中搜索它
system. – bgever Mar 11 at 7:56
</Enable Convert Extension w/ Tortoise Hg 2>
<Enable Convert Extension Manually>
To convert a repository from SVN to HG, I followed these steps:
1) Open C: Program Files TortoiseHg Mercurial.ini 打开 C: 程序文件 TortoiseHg Mercurial.ini
I just converted a remote SVN repo with HTTP auth to a Mercurial repo, and let me tell you, there's not a lot of documentation on how to do this. I had to download the Mercurial source and install it stand-alone, using the source package, that way the SVN bindings will work the right way.
Now it should be running and will create another folder alongside the old one. And an hg folder should be inside. IT WILL NOT BE INITIATED, AND DO NOT INITIATE!
转换完成。
其次,克隆..。
打开 TortoiseHG 工作台。转到 File -> Clone Repository
Source: Enter the full path of the converted repo.
This batch file can be run at any time to pull updates from the SVN source if they happen to be the only ones left on earth actually still using SVN. I haven't tested it so see what happens if you do this so if I were you I'd abandon the original branch if you're going to edit the repo.
The robocopy shamap stuff is to maintain the SVN history if you clone the Hg repo, shamap is ephemeral - check the batch file & shamap in (I'd do that on a new branch).
那批货..。
@echo off
mode con:cols=100 lines=800
:: Change the SVN remote name here
::
set remote=https://cinch.svn.codeplex.com/svn
::
title Fetching SVN from %remote%. This could take...DAYS
echo .
echo Fetching SVN checkins from %remote%
echo .
echo Dependencies: Tortoise Hg and hg.exe in the Path would be ideal.
echo using hg convert
echo .
echo First, I will make a backup of shamap in the hg repo folder.
echo If shamap in .hg\ is newer then it will be copied to the repo.
echo You should commit it so hg clones of this repo work with this.
echo Commit this .BeeyATch file as well.
echo shamap keeps track of what has been fetched from SVN.
echo ok, that ends the educational part of this script...
echo Now I will fetch SVN changes from
echo %remote%
echo ...
echo ...(this could take quite some time)...
echo ...DAYS...yes...DAYS
echo ...especially if it's fecking Codeplex SVN...
echo .
echo If this craps out just run it again - it will resume from where it left off.
echo and fetch the rest...eventually
echo .
echo Control C to abort or any other key to start:
echo .
pause
echo .
:: http://mercurial.selenic.com/wiki/ConvertExtension <== see for details of shamap
:: copy the shamap from the original convert into the .hg folder unless it is already there & newer
:: don't panic if shamap is much bigger than the original - diff it to see why
robocopy .\ .\.hg\ shamap /XO
robocopy .\.hg\ .\ shamap /XO
echo .
hg convert --verbose --debug %remote% "%CD%"
echo .
echo .
echo Finished fetching from %remote%
title Finished fetching from %remote%
echo Any key to Exit
echo .
pause
exit
note: you can even repeat the hg convert command to include new changes made in the svn repository after the previous convert.
note 2: When hg convert doesn't work using http:// or svn:// you could first checkout the Subversion repository (or update an existing one) and convert using the local checkout; example: hg convert [DirectoryOfLocalCheckout] --source-type svn [DestinationDir]