0

I have 3 svn repositories, each having 30~ projects in them. I want to convert these 3 svn repositories into Git repositories, with their respective projects kept inside. To give a clear idea, where is the representation of the structure I have:

-Repository1
  -- project1
  -- project2
  -- project3
  -- project4
  -- project5
-Repository2
  -- project1
  -- project2
  -- project3
  -- project4
  -- project5
-Repository3
  -- project1
  -- project2
  -- project3
  -- project4
  -- project5

I tried a lot of tutorials so far, none worked for my purpose. Most of the tutorials suggest that I create a repository per project, which I find not-okay, as this is not the pattern I have with my svn.

When I execute a command like this:

svn2git http://address/address/Repository1/project1 --authors ../authormap.txt --metadata

it creates a folder of the project as a git repository, which I don't want; because this is not the case with my svn structure.

So I need a command which converts my entire repository (along with the 30 projects in it) into a Git repository. I was told to remove the projectName at the end of the address, like this:

svn2git http://address/address/Repository1 --authors ../authormap.txt --metadata

however it did not work, I got:

command failed:
git checkout -f master

I have been trying methods for almost a day, no luck so far. It should not be this frustrating and complicated to convert a repository. Anyone has a solid idea on the matter?

1 Answers1

-1

There are pleny tools called svn2git, but from your question I'd guess you are not using the KDE one from https://github.com/svn-all-fast-export/svn2git. I strongly recommend using that svn2git tool. It is the best I know available out there and it is very flexible in what you can do with its rules files.

You will easily be able to configure it for your layout to get the result you want and expect.

If you are not 100% about the history of your repository, svneverever from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of a SVN repository when migrating it to Git.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • `svneverever` returns `Server sent unexpected return value (500 Internal Server Error) in response to PROPFIND request for '/svn/X/!svn/bc/90/X.gui.app/trunk/META-INF' Error reading spooled REPORT request response` at 25.45% all the time, so I cannot use it really. –  May 09 '16 at 12:06
  • It probably works better if you get a copy of the repository locally and analyse that. You need it for svn2git anyway. – Vampire May 09 '16 at 12:07
  • Regarding the rules, I couldn't find any example under /samples which resembles my structure. They all somehow imagine that a repository is just one project with a trunk - which is not my case. I have 30 projects in my repository, each having its own trunk. –  May 09 '16 at 12:08
  • Those are only basic examples. You can do all sort of crazy stuff with the rules. Just adapt them to your needs. If you need more examples, look at the KDE ruleset or ask here if you don't get it managed to work like you want. I've transformed much more complex and weird histories with this tool already. – Vampire May 09 '16 at 12:09