Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Svn 有必要在新的目标位置创建一个文件夹,因为克隆过程将创建并初始化它 将权限添加到新的克隆文件夹 你完了_Svn_Version Control_Mercurial_Migration_Hgsvn - Fatal编程技术网

Svn 有必要在新的目标位置创建一个文件夹,因为克隆过程将创建并初始化它 将权限添加到新的克隆文件夹 你完了

Svn 有必要在新的目标位置创建一个文件夹,因为克隆过程将创建并初始化它 将权限添加到新的克隆文件夹 你完了,svn,version-control,mercurial,migration,hgsvn,Svn,Version Control,Mercurial,Migration,Hgsvn,现在还没有人不提(),它可以做到几乎不让人头痛(不包括罕见的病例和特定的树) 只需添加扩展,启用它并hg clone SVN_REPO到本地mercurial REPO迟做总比不做好 两个答案只需一个 如果它是一个公开的、开源的回购协议,你只需要用大约半个小时的时间就可以将它克隆到GitHib,然后把它拉到Hg中 使用hg convert的优点是可以恢复is。将SVN转换为Hg可能需要天。如果您停止此操作,它将从停止的位置继续 下面是我写的一个批处理文件,因为Codeplex SVNbridge

现在还没有人不提(),它可以做到几乎不让人头痛(不包括罕见的病例和特定的树)


只需添加扩展,启用它并
hg clone SVN_REPO
到本地mercurial REPO

迟做总比不做好

两个答案只需一个

  • 如果它是一个公开的、开源的回购协议,你只需要用大约半个小时的时间就可以将它克隆到GitHib,然后把它拉到Hg中

  • 使用hg convert的优点是可以恢复is。将SVN转换为Hg可能需要。如果您停止此操作,它将从停止的位置继续

  • 下面是我写的一个批处理文件,因为Codeplex SVNbridge是垃圾。本例中的回购确实需要几天时间来获取整个历史(我在澳大利亚,所以延迟可能是一个因素)。我想它给了TFS服务器一个很好的打击

    这个批处理文件可以在任何时候运行,以从SVN源中提取更新,如果它们恰好是地球上仅存的仍然使用SVN的更新。我还没有测试过,所以看看如果你这么做会发生什么。如果我是你,如果你要编辑回购协议,我会放弃原来的分支

    robocopy shamap
    功能是维护SVN历史记录如果您克隆Hg repo,shamap是短暂的-检查批处理文件&shamap in(我会在新分支上这样做)

    这批

    @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
    
    @echo关闭
    模式con:cols=100行=800行
    ::在此处更改SVN远程名称
    ::
    设置远程=https://cinch.svn.codeplex.com/svn
    ::
    正在从%remote%获取标题SVN。这可能需要……天
    回声。
    从%remote%回显获取SVN签入
    回声。
    echo依赖性:路径中的Tortoise Hg和Hg.exe将是理想的。
    hg转换回波
    回声。
    echo首先,我将在hg repo文件夹中备份shamap。
    echo如果.hg\中的shamap较新,则会将其复制到repo。
    echo您应该提交它,以便本回购协议的hg克隆可以使用它。
    echo也提交这个.BeeyATch文件。
    echo shamap跟踪从SVN获取的内容。
    好的,这就结束了这个脚本的教育部分。。。
    echo现在我将从中获取SVN更改
    回显%远程%
    回声。。。
    echo…(这可能需要相当长的时间)。。。
    回声…天…是的…天
    echo…特别是如果它是fecking Codeplex SVN。。。
    回声。
    echo如果这个失败了,只需再次运行它-它将从停止的地方恢复。
    回音然后把剩下的拿来…最终
    回声。
    回声控制C中止或任何其他键启动:
    回声。
    暂停
    回声。
    :: http://mercurial.selenic.com/wiki/ConvertExtension 使用Mercurial的:

  • 启用转换扩展;将
    convert=
    添加到.hgrc的
    [extensions]
    部分,如下所示: [扩展]
    皈依=

  • Linux需要额外的python绑定:
    sudo-apt-get-install-python-subversion
  • 执行
    hg convert
    命令
    • 有关帮助信息,请参见
      hg convert-h
    • 示例:
      hg convert http://[svnserver]/[Project]--源类型svn[DestinationDir]
      (参见注释2)
  • 推送到新创建的Mercurial存储库:
    hg推送https://[mercurialserver]/[Project]
  • 注意:您甚至可以重复hg convert命令,以包括在上一次转换后在svn存储库中所做的新更改


    注2:当hg convert使用
    http://
    svn://
    无法工作时,您可以首先签出Subversion存储库(或更新现有存储库),然后使用本地签出进行转换;示例:
    hg convert[DirectoryOfLocalCheckout]——源代码类型svn[DestinationDir]

    我知道,这是我第一次偶然发现的东西,但引用了一句话:“注意,你不能用Win32 Mercurial二进制文件实现这一点——没有办法将Subversion绑定安装到它的内置Python库中。”我在用乌龟…用Linux live CD或虚拟机?这是绝对正确的答案。我只使用hgconvert扩展名()和SVN存储库的文件协议(不带pysvn扩展名):hgconvert完成了这项工作file:///X:/HOME/REPOS/mysvnrep 新的Hgrepnops,无论是用于win32的mercurial二进制文件还是用于Ortoisehg的mercurial二进制文件都没有提供转换扩展,所以“HgConvert”在win32上甚至不是有效的命令。我尝试使用svn://而不是file://但它一直要求Python绑定使用svn://而不是file://在没有Python绑定的情况下对我有效。要启动svn服务器,命令是:svnserve-r-d选择此问题的答案很困难。EvilyBloodyDemon在其回答中评论编辑配置以启用转换扩展时是正确的,但这个回答更清楚,而且更精确,我只想提到,我在没有SVN命令行客户端的情况下测试了它,它也工作了。您甚至不需要SVN服务器来执行此操作,只需访问存储库文件路径即可。一个有1年历史的svn存储库转换得非常快,完整的历史记录完好无损。非常感谢!只需添加-ini文件不是在默认的TortoiseHG安装上创建的。您需要先应用/保存一些设置,或者如果您知道自己在做什么,就从一个空白文件开始。使用TortoiseHG 2.0,这变得更简单:从“开始”菜单启动TortoiseHG工作台。选择文件-->设置。从列表中选择扩展。选中“转换”复选框并单击“确定”。就这样!无需再尝试生成配置文件并在文件系统中搜索它。您好,是否可以解释为什么不应
    init
    第一个存储库?
    python setup.py install
    
    python c:\python26\scripts\hg convert <remote repo>
    
    @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