开发者

Mirror a Mercurial repository into Subversion?

开发者 https://www.devze.com 2023-01-27 06:15 出处:网络
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 al开发者_运维问答l code in their SVN repo.

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 al开发者_运维问答l 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?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消