4

We've got a non-standard svn setup which looks like this:

Root
|----->Trunk
|      |---->Projects
|      |      |---> Project 1
|      |      |---> Project 2
|      |      |---> Project 3
|      |---->Libraries
|      |      |---> Library 1
|      |      |---> Library 2
|----->Tags
|      |---->Projects
|      |      |---> Project 1
|      |      |      |----> 1.0.0.0
|      |      |      |----> 1.0.0.1
|      |      |---> Project 2
|      |      |      |----> 1.0.0.2
|      |      |      |----> 1.0.0.3
|      |---->Libraries
|      |      |---> Library 1
|      |      |       |----> 1.0.0.0
|      |      |       |----> 1.0.0.1
|      |      |---> Library 2
|      |      |       |----> 1.0.0.0
|      |      |       |----> 1.0.0.1

I've already done a git-svn clone, but of course none of the tags work (we have no branches in svn). Is there anyway to untangle this mess into multiple git repos?

HellSpam
  • 81
  • 1
  • 4

1 Answers1

3

You can use git-svn import. You will need to do it once for every project and once for every library. use the -t -T parameters to specify the trunk and tags locations but omit the branch specification.

Now you need to graft all of them together with submodules. Sounds like a fun and challenging project. Let me know if you need anymore help.

Hope this helps.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • I've thought about that, but that would take forever. I'm sure writing a script to automate it wouldn't be to difficult, but alas my scripting skills are a bit rusty. I'm sure with enough time I'd be able to write a script, but thought I might seek some help here. – HellSpam Mar 22 '11 at 21:36
  • I would suggest getting some help on the git irc channel. That's the best medium to get realtime help with writing a script like that. Use pastie.org to paste and show your script along with results of your script. If your history is important to you, then do it. If you want to inspect it only now and then, keep a back up of the svn version and make an "aggregate history" in git where you only commit the tags and then the trunk for each project (don't forget the versions of the libraries that are referenced by the superproject tags). – Adam Dymitruk Mar 29 '11 at 05:25