Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-svn clone or svn2git unexpectedly stopping

Tags:

git

git-svn

I am trying to migrate from git to svn with the following command:

git svn clone --stdlayout https://my_sourcecontrol

or with git2svn

svn2git --notags https://sourcecontrol -v

During the migration, it just stops with the following statement:

W: -empty_dir: directory

When I do a git branch -a

I see it has imported the tags and a number of branches that were deleted some time ago. Also, it has not imported any of the existing branches only the ones that were deleted some time ago.

Can anyone shed any light on what is going on?

like image 841
dagda1 Avatar asked Sep 17 '10 07:09

dagda1


3 Answers

You could experiment a bit with a smaller clone, only doing one branch at first to see if that works, for example.

I've seen a similar problem: After running for a couple of minutes, git-svn fetch (which runs under the hood of git svn clone) halts with "signal 13".

I don't see any error message in your output, but maybe it's different on Windows or something. Nonetheless, running git svn fetch should pick up where it left off. I made a little shell-script loop to run fetch until it's done (you need cygwin/*nix to run this):

while ! git svn fetch; do echo "git-svn halted. Restarting...i"; done
like image 199
Thomas Ferris Nicolaisen Avatar answered Sep 28 '22 19:09

Thomas Ferris Nicolaisen


This powershell version of the above *nix script worked for me:

$i = 1
do
{
    git svn fetch
    if( !$? )
    {
        Write-Host "git-svn halted. Restarting... $i++"
    }
    else
    {
        Write-Host "git-svn completed successfully"
    }
}
while( !$? )
Write-Host "git-svn fetch required $i iteration(s)"
like image 31
Jonathan B. Avatar answered Sep 28 '22 17:09

Jonathan B.


I had a similar problem.

In the early days of the SVN repo, I was using the default file structure of a trunk/ and tags/ folder at the top level. At a later date, I switched to a <project name>/trunk, <project name>/tags structure with multiple projects.

So using the --stdlayout switch only resulted in the earlier code being migrated (because the <project name>/* files were ignored).

Using -t <project name>/tags and -T <project name>/trunk solved the problem.

like image 21
Mark Avatar answered Sep 28 '22 17:09

Mark