24

Had nothing to do today, so I thought I´ll test the migration of SVN to Git in Gitlab.

Boss sent me a mail today, that when I migrate we need to preserve the history, so I actually have to put some effort in it. *sigh*

Shout-out to the Gitlab documentation at this point.
That´s probably the best doc I´v ever read...

Well so I tried to use svn2git. And well...
Who the fuck thought that this piece of shit software is in any way usable?
Holy crap!
If it fails, it just does so without any info why. Even in verbose mode.
And the RAM usage? What the actual fuck?
This whole thing is a complete memory leak!
32Gigs of RAM full in Minutes and the whole system starts to stall!
And then when I thought it finally runs through.
Bam another git checkout error...

Googling for that error then I found something. A version of svn2git made in .Net Core.
Didn´t expect much but I tried it anyways.
And would you look at that!
It ran so smooth and didn´t need that much RAM , I had some doubt it did work correctly.
But it did!

I think I´m gonna pay a coffee or two to some guy over in China now!

Comments
  • 0
    And why don't you use git?
    https://git-scm.com/docs/git-svn
  • 1
    @Noren svn2git is nothing else but a wrapper for git-svn.
    It automates a lot of steps you would otherwise have to do manually.
    And since we don't have standard repositories in SVN, I would be sitting there doing all that steps for every single project.
    Which we have a lot...
  • 1
    I didnt know that, i had only worked with it once before and had written scripts for automation myself
  • 1
    @Noren In my case it does exactly what I need. (At least the svn2git.Net Version I found)
    So I don´t need to automate much myself, except for converting the single projects.

    The SVN Repo here hasn´t been maintained that well from my predecessors.
    They didn´t understand the concept of branches or tags.
    They basically just spit every project (no matter what it was) into the trunk of one repository.

    So I have now a script which goes through every folder in trunk and calls svn2gitnet with the option --rootistrunk to create a new git repo.

    Now gotta work on something to get those repos into gitlab afterwards.
  • 1
    There is a rake task for that https://docs.gitlab.com/ce/...
  • 0
    @Noren Well as I said: Best Documentation I´ve read so far.
    Thanks for the tip!
Add Comment