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
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’:
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:
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:
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: