Unknown error while importing from SVN

I tested transfer from SVN to GIT with synchronization by subgit, but the result was an unknown error.
Could you help me with my problem? I am attaching files with logs.subgit-install-20210806-024941.zip (8.4 MB)

Hi Arkadiy,

Thanks for reporting the problem along with the logs.

It turns out SubGit has run out of its heap space while converting one of SVN revisions into a Git commit. Most probably, the SVN server response was too big to handle it with the default heap size. Now, in order to fix the problem you can do the following:

  1. Make sure you’re using proper branches and tags mapping. If the structure of your SVN repository has changed over its history, older branches may mismatch the mapping you’ve specified. That may lead to huge server response. We usually recommend configuring your mirror with subgit configure --layout auto --trunk TRUNK SVN_URL command. This command scans SVN repository history and excludes any mismatched branches from import. Please note that you’d need to start the import from scratch in this case.

  2. Increase the heap size by editing SubGit executable SUBGIT_DIR\bin\subgit.bat:

    EXTRA_JVM_ARGUMENTS=-Djava.util.logging.config.file="%BASEDIR%\conf\logging.properties" -Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Djna.nosys=true -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate  -Xmx1g

    and then run subgit install GIT_REPO command again. You don’t have to start from scratch in this case, just run the command on the directory you used for the previous run.

  3. Enable HTTP spooling:

    edit GIT_REPO\subgit\config
        httpSpooling = true

    and then run subgit install GIT_DIR as usual. Again, you can run the command on the directory you used for the previous run.

Hope this information helps.

Hi Semyon!
Thanks for the recommendations, transfer from SVN to GIT was successful. But I don’t see GIT"s commit history/

Hi Arkadiy,

Could you share the log files generated at GIT_REPO/subgit/logs/ directory?

Usually, an empty Git repository means the branches mapping was misconfigured and SubGit was not able to match any SVN branches during the import.

Double-check the SubGit configuration file at GIT_REPO/subgit/config, esp. svn.url, svn.trunk, svn.branches, svn.tags and svn.shelves options there, e.g.:

    url = https://host/svn/repo
    trunk = trunk:refs/heads/master

means that SubGit will look at https://host/svn/repo/trunk path during the import.

I did the transfer with the same repository by git (git svn clone). Repository was cloned and I saw the commit history. When used subgit, transfer was successful. But I don’t see history. I am attaching files with logs.
subgit-configure-20210805-181935.zip (3.3 KB) subgit-install-20210805-182129.zip (8.4 KB)

Hi Arkadiy,

Thank you for the log files provided.

It turns out SubGit was unable to find any of the following locations at your SVN repository:


As result it has imported your SVN repository as empty, that’s why there are now branches or tags in the Git repository.

Please double-check the SVN URL including the letter case:


and then let us know the directory structure under this URL. Thank you in advance!

Hi Semyon!
Thanks for the information. Yes, there was error - subdirectory wasn’t specified in address (https://vrd-srvdev.verdi.ru:1234/svn/VERDI2_test/MTVERDI). The commit history is visible now. I expect that bi-directional synchronization will be after git install. I am going to connect remotely to the git repository for synchronization when posting commits, are there any additional steps required?

Hi Arkadiy, Ildar’s here

that’s right, after the subgit install finishes the initial import, the SVN and Git repositories are in sync and any commit pushed to the Git commit will be sent to SVN and vice versa, every new SVN revision to a mirrored branch will be sent to Git. And after the initial import is done, it’s possible to clone the Git repository and start working with it as with any other Git repository.