Git as frontend for SVN

We have large SVN repository and do not want to migrate fully. But want to use GitLab as a front end for commits, especially for Merge Approval process. Is it a good use of SubGit?

yes, it’s a good use of SubGit, if you describe your situation in detail we could propose you more concrete advice about the way to setup SubGit.

First of all it’s not clear what you mean by “do not want to migrate fully”.

  1. If you mean that your SVN repository contains several projects, each one in it’s own directory, like famous Apache SVN repostiory (an SVN repository with nearly 2M revisions containing every single Apache project); then you can only use SubGit for those projects which you want Git frontend for. To do that, just specify the URL of the specific projects, not of the repository root.

  2. You can also limit the revisions to convert to Git using ‘svn.minimalRevision’ option. E.g. if you set it to 1000, only revisions from [1000, HEAD] range will be translated to Git. You can even translate only the last revision. But I’d like to warn you: the expected time and size saving of translating just one or several latest revision are much less than one could expect. This is due to the effect that you can see on this video. The analogy is the following: usually the number of branches is small in the beginning of the history and each branch is usually smaller as well. This corresponds to the bottom of the conical glass. And near the end of the history the number of branches and tags is large and each of them is large. As result, a few latest revisions might contain as much data as the rest of the history. So I wouldn’t recommend to use this option unless you have to.

  3. For each repository you can choose only certain trunk/branches/tags to convert to and from Git, instead of converting each one.

Depending on your needs, combining (1)-(3), you can partly migrate your repository to Git and since then use GitLab as the front end to that part of the repository; new Git commits will get into SVN.

Finally, I would like to note that the setup for GitLab slightly differs from the setup for other Git hosting solutions, so we have a special manual for that. The main difference is in the directory where Git hooks reside: usually it’s GIT_REPO/hooks directory while in GitLab it’s GIT_REPO/custom_hooks.

If you describe your situation in more details, we’ll be able to help you with setting SubGit up for your needs.