本文介绍了如何在 Windows 上从 SVN 迁移/转换为 Mercurial (hg)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种工具来将几个 SVN 存储库迁移到 Mercurial,包括历史记录、标签等.

I'm looking for a tool to migrate a couple of SVN repositories to Mercurial, with history, labels and so on.

我使用的是 TortoiseHg (Windows x32),因此 ConvertExtensions 被丢弃.有一些关于如何在 Linux 机器上执行此过程的信息(hgsvn),但我不没有可用的 Linux 机器.

I'm using TortoiseHg (Windows x32), so ConvertExtensions are discarded. There's some info on how to do this process on a Linux box (hgsvn), but I don't have a Linux machine available.

我可以在 Windows 上使用这些 Python 脚本吗?如果是这样,我需要做什么?或者,我可以使用哪些其他工具来完成此过程?

Can I use those Python scripts on Windows? If so, what do I need to do it? Or, what other tools can I use to do this process?

基本上,如何将 SVN 项目转换为 Mercurial?

Basically, how can I convert an SVN project to Mercurial?

推荐答案

我只能自己解决这个问题.我有一台带有单独的 Windows 服务器的 Windows XP 机器托管 VisualSVN 服务器.

I just had to tackle this problem myself. I have a windows XP machine with a separate windows server hosting VisualSVN Server.

我还安装了 TortoiseHG 以及 CollabNet Subversion 命令行客户端.

I also have TortoiseHG installed as well as the CollabNet Subversion Command-Line Client.

非常感谢 bgever 在评论中指出使用 TortoiseHg 2.0,启用转换扩展比以往更容易.正如他所说

Many thanks to bgever for pointing out in the comments that with TortoiseHg 2.0, enabling the convert extension is easier than ever. As he says

使用 TortoiseHG 2.0 已经做到了更简单:启动 TortoiseHG工作台从开始菜单.选择文件 --> 设置.选择扩展从列表中.检查转换"复选框并单击确定.而已!不需要尝试生成配置不再文件并在文件中搜索它系统.– bgever 3 月 11 日 7:56

</Enable Convert Extension w/Tortoise Hg 2>

5) 打开命令提示符并导航到您希望在其中创建新 hg 文件夹的目录(该过程将在命令提示符打开的目录中创建一个名为 yoursvnreponame-hg 的新文件夹).

5) Open the command prompt and navigate to the directory that you'd like the new hg folder created in (the process will create a new folder called yoursvnreponame-hg in the directory that the command prompt is open to).

6) 使用这个命令

hg 转换文件:///y:/yoursvnreponame

我发现转换工具在联网存储库方面可能存在问题,因此我必须将驱动器映射到它,但这对我来说效果很好.

I found that the convert tool can have problems with networked repositories, so I had to map a drive to it, but this worked just fine for me.

这篇关于如何在 Windows 上从 SVN 迁移/转换为 Mercurial (hg)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 17:50
查看更多