2

I am trying to convert some old svn repros to git using svn2git under Windows. I execute the following command from my git bash

svn2git https://repo.example.com/repos/my_repro --username user --notags --authors ~/authors.txt --verbose

But nothing happens. I see that a ruby process gets spawned and that this spawns cmd.exe which in turn spawns a new git svn init instance. However, despite the --verbose option I see no output. The mentioned processes do not consume any CPU time and when capturing network traffic I don't see any traffic to the SVN server.

What am I doing wrong?

sigy
  • 2,408
  • 1
  • 24
  • 55

2 Answers2

1

There are pleny tools called svn2git, the probably best one is 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.

From your question I see you are not using the one I mentioned.

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 an SVN repository when migrating it to Git.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • Thanks! I wasn't aware of the fact that there exist different tools called `svn2git`. I didn't try your suggestion because I didn't have an environment ready to compile it myself. – sigy Aug 23 '16 at 08:56
  • Even the `svn2git` tags description tells you so. ;-) – Vampire Aug 23 '16 at 09:29
0

I ended up using git svn clone. After all I didn't need any special treatment for my very simple repository so that it did the trick. I had totally forgot about this possibility in the first place.

I used the procedure described in Pro Git

sigy
  • 2,408
  • 1
  • 24
  • 55
  • `git-svn` is **not** the right tool for one-time conversions of repositories. It is a great tool if you want to use Git as frontend for an existing SVN server, but for one-time conversions you should **not** use `git-svn`, but `svn2git` which is much more suited for this use-case. – Vampire Aug 23 '16 at 09:29
  • Why is that so? Unfortunately my svn repository got deleted in the meantime (its hosting plan expired, that was why I needed to convert it) so I have to work with what I have now. – sigy Aug 23 '16 at 13:21
  • Too many reasons for a comment. e. g. it produces much worse results, the history is rebuilt better by svn2git, the tags are real tags and not branches, if you changed layout in SVN you can easily configure this with svn2git, with git-svn you will loose history eventually, with 'svn2git' you can also split one SVN repository into multiple Git repositories easily or combine multiple SVN repositories into one Git repository easily, ... – Vampire Aug 23 '16 at 13:33
  • ... yet another reason, with git-svn the tags contain an extra empty commit which also makes them not part of the branches, so a normal fetch will not get them until you give --tags to the command as by default only tags pointing to fetched branches are fetched also. With the proper svn2git tags are where they belong – Vampire Aug 23 '16 at 13:33
  • Ok, that puts my mind at rest, since the points you listed are not relevant for me. I didn't have tags or branches in my SVN repo. Anyway, I see your point for more complex migrations. Since you helped me to learn something I will accept your answer instead of mine so that you get the reputation you deserve. – sigy Aug 23 '16 at 13:59
  • Oh and forgot, it is a bazillion faster, especially for big codebases with many commits. :-) – Vampire Aug 24 '16 at 14:38