views:

125

answers:

2

I have a subversion repo with an odd layout:

trunk

Project1

Project2

tags

Project1-0.2.4

Project2-1.9.0

branches

Project1-crazyidea

I know, I know, this was stupid. I should have had a trunk, tags, and branches directory underneath each Project. However, is there anyway to convert this to git (for a particular project) with history?

Most of the git-svn tutorials assume the standard layout, and do not cover this particular situation.

Thanks!

+2  A: 

If you intend to abandon the SVN repository once it has been converted to Git, then you should consider splitting the SVN repo prior to the conversion.

svndumpfilter can be used to split the two (or more) repositories into independent repos (with their complete history). Once this is complete, git svn can be used to import them.

Tim Henigan
A: 

In the meantime, there's a new tool called svn all fast export, which can import large svn repositories using a set of rules. The KDE people use it to convert their huge svn history into multiple git repositories: http://repo.or.cz/w/svn-all-fast-export.git Example rule sets should be findable ob the internet. Might be too late for the original poster, but maybe someone else stumbles uppon this.

Vultapher