We are currently preparing to migrate our SVN repository to git repositories. Since we have alomost 100’000 commits and several branches to handle, but we definitely want to keep all of the commit history, svn-all-fast-export (aka svn2git) seems to be the right tool, but I am experiencing problems when testing on a test repository.
1.) I created a local svn test repo svnrepo and within some branches (e.g. trunk, externals), and commited sample files to these (e.g. foo.txt).
2.) I prepared the authors file as I would for git svn.
3.) I prepared the rules file as in the KDE sample files (e.g. first creating repos project and externals, then matching rules).
4.) When testing with git svn,
git svn clone url/path/to/svn/repo
everthing looks fine and I get the full repository structure and commit history.
5.) PROBLEM However, running svn-all-fast-export,
svn-all-fast-export --identity-map path/to/identitymap --rules path/to/rules/map /path/to/svn/repo
my repository folders end up being empty (apart from folders branches, hooks, etc. and configs, description, HEAD and marks file).
Also running the –stats command, the rule stats show that the algorithm detected changes in trunk and in externals and applied the matching rules, e.g.
create repository project
end repository
create repository externals
end repository
match trunk
repository project
branch master
end match
match externals
repository externals
branch master
end match
Unfortunately I am neither a learned CS, nor have I profound knowledge neither in SVN nor git, so I might have overlocked something really simple?! Anyway, I am stuck and would appreciate any suggestions which could help me overcome this problem.
I am running Ubuntu 24.04 LTS on a Oracle VM VirtualBox, I downloaded svn-all-fast-export from the svn-all-fast-export repo, followed the instructions listed there and then run the command line as shown above. Since this did not work, I tried initialising the git repo before running the svn-all-fast-export command line, but this usually resulted in fast import crashes (marks file not found). For SVN commits I used the tool RabbitVCS (but the latter does not seem to be the source of the problems.)
Björn PB is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.