converting svn repo to git using reposurgeon

馋奶兔 提交于 2020-01-23 04:54:09

问题


I am trying to convert an svn repo to git using reposurgeon.

Here is what I did ( have a repo.map file that has the svn name -> git name mapping):

svnadmin dump /home/subversion > repo.svn
reposurgeon "verbose 1" "repo.svn" "authors read" "write repo.fi"

reposurgeon runs for many hours (lots of swapping as it is a 12GB dump file), and everything looks good. Here is the output I get:

    reposurgeon: verbose 1
    reposurgeon: from repo.svn...copynodes+filemaps+copysets+commits+branches+parents+root+branchlinks+svn-mergeinfo+tagifying+tagify-empty+polishing+canonicalizing+resets+debubbling+renumbering+14163 revisions (1/s)...(9810.18 sec) done.
reposurgeon: r13: deleting parentless zero-op commit.
.
.
.
reposurgeon: r13726: deleting parentless zero-op commit.
    2012-12-24T01:16:23Z * repo.svn

At this point reposurgeon just sits. I'm not sure where to look for a solution at this point, as it never actually gives me an error message. Any suggestions are most welcome.


回答1:


It's successfully imported the repository, but then it goes to process the authors read command, but you didn't specify a file. At this point it's actually waiting for the file to appear on stdin. Use authors read <author-map where author-map is the name of the file containing the map.

You'll also want to change the write command to write >repo.fi, for similar reasons.




回答2:


If you would consider an alternative to reposurgeon and git-svn, have a look at SubGit.

$ subgit configure /home/subversion
#edit /home/subversion/conf/subgit.conf to set 'core.authorsFile' option to path to "repo.map" file
$ subgit install /home/subversion
$ subgit uninstall --purge /home/subversion

The converted repository will be in /home/subversion/.git directory. As a bonus, you'll have all svn:ignore and svn:eol-style properties converted to their Git analog.

Usually SVN repository is about 4x more compact than a corresponding dump file, so the conversion of the original repository can be faster than dump-based conversion.




回答3:


I chose to use git-svn instead, if you would consider an alternative to reposurgeon.



来源:https://stackoverflow.com/questions/14017127/converting-svn-repo-to-git-using-reposurgeon

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!