Mercurial 和 Subversion 之间的互操作

发布于 2024-07-18 10:31:34 字数 818 浏览 4 评论 0原文

最近有人提出了类似的问题,但并不相同。

Mercurial 网站有一个详细页面,列出了 4 个不同选项的比较让 Mercurial 和 Subversion 进行互操作。

我想知道是否有人尝试过其中的一种或多种,​​并且可以讲述任何非常好的或非常糟糕的经历。 hgsubversion 下载

hgsubversion 是一个扩展 Mercurial 允许使用 Mercurial 作为 Subversion 客户端。 现在它 尚未准备好用于生产使用。 你 应该只使用这个,如果你是 准备好破解它,然后去潜水 进入 Mercurial 的内部和/或 颠覆。

这对我来说是一个吸引人的标志,上面写着“放弃希望,所有进入这里的人”或“侵入者将被逮捕”。 所以我只是想知道对于没有太多额外时间的人来说,这个或任何其他替代方案是否值得尝试。

A similar question has been asked recently, but is not the same.

The Mercurial website has a detailed page listing comparisons for 4 different options for getting Mercurial and Subversion to interoperate.

I am wondering if anyone out there has tried one or more of these, and could relate any really good or really bad experiences. The note on the hgsubversion download says

hgsubversion is an extension for
Mercurial that allows using Mercurial
as a Subversion client. Right now it
is not ready for production use. You
should only be using this if you're
ready to hack on it, and go diving
into the internals of Mercurial and/or
Subversion.

which is about as inviting to me signs that say "Abandon hope, all ye who enter here" or "Trespassers will be arrested". So I'm just wondering if this or any of the other alternatives are worth trying for someone who doesn't have a lot of extra time to hack around.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

我是男神闪亮亮 2024-07-25 10:31:34

我认为 hgsubversions 作者有点偏执。 如果您遵循自述文件 - 意思是使用适当的最新版本的 Mercurial 和 subversion - 而不是安装在您的发行版上或由您的发行版安装的任何内容 - 那么它实际上工作得相当好。 同样,所包含的文档也是最新的; 而您在网上找到的内容可能并非如此。 我已经使用它几周了,取得了合理但不完美的结果。

当你进入两个系统的角落时,你就会遇到问题:hgsubversion 和其他扩展(我对 hgtasks 有问题)似乎彼此不喜欢; 目前尚不清楚如何处理属性等。

I think hgsubversions author is being a bit paranoid. If you follow the README - meaning use suitably recent versions of mercurial and subversion - not whatever happens to be installed on or by your distro - then it actually works fairly well. Likewise, the documentation included is up to date; whereas what you find on the web may not be. I've been using it for a couple of weeks with reasonable - but not perfect - results.

It's when you get into the corners of the two systems that you have problems: hgsubversion and other extensions (I have problems with hgtasks) don't seem to like each other; it's not clear how properties are handled, etc.

巨坚强 2024-07-25 10:31:34

我刚刚开始使用选项 4 hgsvn。 不管 Mercurial 页面怎么说,hgsvn 0.1.7 确实支持推送回 svn 存储库。

我的用例非常简单:我真的只希望能够拥有本地分支机构(在现阶段)。 hgsvn 页面上列出的工作流程正是我所使用的,到目前为止还没有没有损坏任何东西。

I've just started working with option 4, hgsvn. Despite what the Mercurial page says, hgsvn 0.1.7 does support pushing back to the svn repo.

My use case is very simple: I really only want the ability to have local branches (at this stage). The workflow listed on the hgsvn page is exactly what I've used and so far it hasn't broken anything.

物价感观 2024-07-25 10:31:34

我想要第二个选项hgsvn,如果你想镜像一个大的存储库,它会相当慢,但你可以从接近提示的修订开始(这通常是你想要的)。

我发现它非常强大,镜像存储库有超过 5000 个修订。 如果您愿意,您可以推迟更改集。

I'd like to second option hgsvn, it's rather slow if you want to mirror a big repository, but you can start at revision close to the tip (which is usually what you want anyway).

I found it very robust, mirrored repositories with over 5000 revisions. You can push changesets back if that's what you want.

貪欢 2024-07-25 10:31:34

是的,您必须使用 Mercurial 的最新“crew 版本”,请参阅 Mercurial wiki 上的 CrewRepository 页面。

当 Mercurial 1.3 于 7 月 1 日发布时,hgsubversion 应该开始维护一个稳定的分支。 至少 IRC 上是这么说的(irc.freenode.net 上的#hgsubversion)。

Yeah, you must use a recent "crew version" of Mercurial, see the CrewRepository page on the Mercurial wiki.

When Mercurial 1.3 is released on July 1st, hgsubversion should begin maintaining a stable branch. At least that's the word on IRC (#hgsubversion on irc.freenode.net).

花想c 2024-07-25 10:31:34

我已经使用 Subversion 好几年了,但我有兴趣尝试这种分布式 VCS 想法。 (我想使用 git,但它在 Windows 上不太好,这使得它无法在我的工作中使用。所以接下来我想尝试 Mercurial。)我最初想

使用 Subversion 服务器进行推送和拉取。 所以我尝试了选项 1,hgsubversion。 我使用的是 Ubuntu 9.04 (Jaunty) 和 hg 1.1.2。 我按照该网页上给出的指示进行操作。 一切似乎都安装得很好。 但是当我尝试 hg svnclone 命令时,出现“未知命令”错误。 进一步挖掘表明,现在您只需使用前缀为 svn+ 的 SVN URL 进行 hg clone 即可。 例如:

hg 克隆 svn+https://server/svn/repo/

但是,我收到了一条错误消息:

中止:无法导入模块编码!

这似乎是 已知错误,但经过一番摆弄后,我不知道该怎么做才能修复它。

摘要:选项 1 目前对我来说不起作用。 其他选项不适合我想要的工作流程。

更新:我用 Mercurial 1.2.1 再次尝试,得到了相同的结果。 有人告诉我正在开发的 mercurial-crew 分支应该可以工作。

I've been using Subversion for several years, but I'm interested in trying out this distributed VCS idea. (I would like to use git, but it isn't so good on Windows which rules it out for use at my work. So I next would like to try Mercurial.)

I initially would like to push and pull with a Subversion server. So I tried option 1, hgsubversion. I'm on Ubuntu 9.04 (Jaunty) with hg 1.1.2. I followed the directions given on that web page. It all seemed to install fine. But when I tried the hg svnclone command, I got an "unknown command" error. Further digging showed that now you just do hg clone with the SVN URL prefixed by svn+. e.g.:

hg clone svn+https://server/svn/repo/

But then, I got an error message:

abort: could not import module encoding!

That seems to be a known bug, but after some fiddling around, I couldn't figure out what I'm meant to do to fix it.

Summary: option 1 currently not functional for me. The other options don't fit my desired work-flow.

Update: I tried it again with Mercurial 1.2.1, and got the same result. Someone told me that the in-development mercurial-crew branch should work.

独守阴晴ぅ圆缺 2024-07-25 10:31:34

我已经使用 hgsubversion 几个月了。 您可能会缺少一些功能,但它已可供生产使用。

OGRE 和许多其他人决定使用 hgsubversion,因为它速度很快。

I have been using hgsubversion for several months. You might be missing some features but it is ready for production use.

OGRE and many others have decided to use hgsubversion because it is fast.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文