将 Mercurial 存储库镜像到 Subversion 中?

发布于 2024-10-05 05:02:34 字数 148 浏览 0 评论 0原文

我正在使用 Mercurial 开发一个客户项目。在我为此工作了 2 周后,客户现在要求我将所有代码保留在他们的 SVN 存储库中。

我想继续使用 Mercurial 进行开发,但为了让客户满意,也将所有提交(带消息)导出到 SVN 中。

这可能吗?

I am using Mercurial to develop a client project. After I've been working on this for 2 weeks, the client has now requested that I keep all code in their SVN repo.

I want to continue to use Mercurial for development, but to keep the client happy, export all commits (w/ messages) into SVN as well.

Is this possible?

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

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

发布评论

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

评论(1

标点 2024-10-12 05:02:34

您可以使用 Mercurial 作为其 Subversion 存储库的客户端。

您检查过 hgsubversion 了吗?这使您可以拥有 Mercurial 的完整历史记录。

请参阅以下详细信息:https://www.mercurial-scm.org/wiki/WorkingWithSubversion

它提供了三种使用 Subversion 的方法。确保使用其中一种并且不要混合使用。

  1. 使用 hgsubversion
  2. 使用 MQ
  3. Convert 扩展

[个人经验]

我发现 hgsubversion 更好,但在将 suversion 存储库转换为 Mercurial 存储库时它可能会出现问题。

# This usually fails for a svn repo with 
# large history or large files in revchanges

hg clone svn+http://.../svn local-hg

# If the above has any issues and dies before converting the repo, use hg pull
hg pull

问题:您已经有一个现有的存储库。

  1. 我想最好的方法是使用上述方法之一从 subversion 存储库创建另一个 Mercurial 存储库。
  2. 将您的更改集从旧的存储库拉入新的存储库,以获取上一个存储库的所有更改和历史记录
  3. 现在您已准备好将更改提交到 svn 存储库

You can use Mercurial as client to their subversion repository.

Have you checked out hgsubversion yet? This allows you to have complete history in Mercurial.

See the details at : https://www.mercurial-scm.org/wiki/WorkingWithSubversion

It provides three ways of working with Subversion. Make sure that you use one and do not mix them.

  1. With hgsubversion
  2. With MQ
  3. Convert extension

[Personal Experience]

I have found hgsubversion better how ever it may have issues while converting the suversion repo to a Mercurial repo.

# This usually fails for a svn repo with 
# large history or large files in revchanges

hg clone svn+http://.../svn local-hg

# If the above has any issues and dies before converting the repo, use hg pull
hg pull

Issue: You have an existing repo already.

  1. I guess the best way would be to create another Mercurial repo from the subversion repo using one of the methods above.
  2. Pull your change sets into this new repo from the older one to get all the changes and history from the previous one
  3. Now you are ready to submit the changes to svn repository
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文