Experiences with git-svnimport
From: Christian Biesinger <hidden>
Date: 2016-06-15 22:42:18
Hi, since I now got git-svnimport to work, I thought I'd post my experiences with it, as that may be helpful for others. I had various setups here. One of them was the usual (?) one, where I had a subversion repository at https://servername/svn, containing three projects. One of them followed the usual structure: projectname/trunk projectname/branches/... Now, the straightforward way would be: git-svnimport -C somedir https://servername/svn projectname It turns out that this is equivalent to git-svnimport -C somedir https://servername/svn/projectname if the -d or -D option is not specified, and those can't be used with https. And that doesn't work. The problem is that the SVN repository contains urls relative to the top of the repository, i.e. /projectname/trunk/... That doesn't match the /trunk/ that's expected by svnimport. The solution for this: Apply the patch I sent earlier and use: git-svnimport -v -C somedir -T projectname/trunk -b projectname/branches https://servername/svn/ It turned out that the other two projects on this server didn't use the trunk/branches structure (I forgot about that when setting them up), but that was not a problem: I could just do: git-svnimport -v -C somedir -T projectname https://servername/svn/ This also works fine for a svn+ssh:// repository. Now, maybe my setup was unusual, and I should instead have used separate repositories for different projects. However, this worked for me, and my experiences in getting this to work might be of interest to others.