开发者

Migrating svn repo with non-flat branch hierarchy to mercurial

Is there a conversion utility from svn to hg that can deal with a branch hierarchy that's more complex than just a flat list of branches under /branches?

My repository has a directory that looks (conceptually) like this:

/branches
  /projectA
     /v1.x
        /v1.1
        /v1.2

etc..

IOW I need a tool that can get a tree structure as input that represents the branch hi开发者_开发技巧erarchy, and migrate this into hg (could be flat in HG, don't really care).


The convert extension has a number of options to map paths and branch names. Maybe these can be of help. You could also try to make a copy of your SVN repository and in that copy move the branches into a flat structure before converting it. Finally, you could try to convert to a Mercurial repository, and then convert that repository again to do some cleaning up.

If that doesn’t help either, I fear that your options are limited... Probably you would have to write a custom script that manually converts the repository, or uses history rewriting to alter the converted repository. You could also take the convert or hgsubversion extension and modify them to suit your needs. Or you could decide to ditch the branches entirely, or only keep a few important ones and manually create them/clean them up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜