Com.syntevo.svngitkit.core.b.j: fatal: failed to run repack

I’m currently trying to do a one time import of a project from SVN to Git. The operation is failing with the following.

[2019-05-13 18:16:07.642][subgit-import][1] Executing [git, -c, gc.autoDetach=0, gc]; environmentVariables={};workingDirectory=C:\myfolder.git
[2019-05-13 18:16:08.642][subgit-import][1] fatal: failed to run repack
com.syntevo.svngitkit.core.b.j: fatal: failed to run repack
at com.syntevo.svngitkit.core.a.b.a(SourceFile:70)

The command being run is
subgit import --non-interactive --default-domain com.com --username id --password pwd --minimal-revision 1 --trunk trunk --branches branches --tags tags --svn-url https://svn_url C:\myfolder.git

This is happening with the following software versions

subgit SubGit version 3.3.6 ('Bobique') build #4276
git 2.21.0.windows.1
jdk 1.8.0_121-b13

The project is fairly large at 528MB for trunk/tags/branches. Importing only the trunk succeeds.

Hello Shaun.

Unfortunately, the log part you’ve sent is too small to find out the cause, may we have the whole import log for analysis? My assumption is that some file in the repository may be blocked by another application, for example, by an IDE, could it be the case?

As a workaround try not to trigger Git gc by setting ‘svn.triggerGitGC’ to ‘false’:

https://subgit.com/documentation/config-options.html#svn.triggerGitGC

To get it done, add the setting to ‘svn’ section of the configuration file.

[svn]
    trunk=trunk:refs/heads/master
    branches=…
    tags=…
    …
    triggerGitGC = false

Additionally, it may worth setting ‘core.gitPath’, too to urge SubGit using Git binary to Git operations:

https://subgit.com/documentation/config-options.html#core.gitPath

Those settings cannot be changed by the ‘import’ command so this workaround will require preliminary configuration with ‘configure’ command:

subgit configure --layout std --svn-url https://svn_url C:\myfolder.git

After that edit C:\myfolder.git\config file: set the default domain, triggerGitGC and gitPath, optionally set auth.userName and auth.password and run the import with the short import command:

subgit import C:\myfolder.git

Hope it will help.

The triggerGitGC = false option fixed it! Thanks for your help.

On another note - are there any options besides the minimal revision that I can set to speed up the translation process.

Hello Shaun

yes, there are a few. The first approach is to reduce the amount of data to import from SVN – that could be done by setting the minimal revision, you’re completely right, but also it’s possible to limit the number of importing branches/tags either by setting the mapping configuration appropriately or by using excludeBranches/excludeTags:

https://subgit.com/documentation/config-options.html#svn.excludeBranches

Additionally, it’s possible to exclude some files/folders from the import using excludePath/includePath:

https://subgit.com/documentation/config-options.html#svn.excludePath

Besides, I’d recommend using “subgit configure --layout auto” during the initial configuration – with this option SubGit connects to the SVN repository, scans its history and creates a mapping configuration trying to get rid of possible problems in it, like, for example, erroneous branches that were created by copying repository root.

Additionally, there are settings that can affect import performance – you’re familiar with two of them already, those are core.gitPath and svn.triggerGitGC; also, there are translate.eols and core.streamFileThreshold, here are little more details:

https://subgit.com/documentation/faq.html#import_performance

Hope it will help.

Thanks for the information, it’s greatly appreciated.