Open AnLupoTamTamy opened 3 years ago
This utility can create a git repo from a SVN repository, not a working copy. You need the repository which was created by svnadmin create
once (on a server).
I got this error too when I tried to use a working copy (checked out by svn checkout
). Working copies have a format
file in their .svn
folder and it contains 12
for me which this utility doesn't like either (eg if you try wiki/.svn
then that will emit a different error).
However, repositores have the format
file in their root and that is what this tool expects.
Thank you for your answer. This mean that I need to connect to remote SVN server where I have the repository and on that server start the tool? Is there a way to run the process on a server which is not the server on which SVN server is installed? If I understand correctly your answer, this utility can't run on my local pc.
For KDE what we did was, 1: Set the SVN repository in read only mode. 2: rsync the remote SVN repository to the local PC 3: Run the conversion (on the local PC) 3.x: Verify/rerun until ok 4: Upload the resulting git repo(s)
Check if you can run svnadmin
on your local computer. I think the subversion
package installs it too.
Someone must dump the repository for you on the server with svnadmin dump repo_directory > repo.dump
. On newer versions it may be svnadmin dump --file=repo.dump repo_directory
(check svnadmin dump --help
)
Then you can load that dump on your computer and use this tool:
svnadmin create mylocalrepo
svnadmin load mylocalrepo < repo.dump
# on newer versions it may be
# svnadmin load --file=repo.dump mylocalrepo
# check svnadmin load --help
# now pass the mylocalrepo directory to the tool
Or it is possible to just download the repository directory (like mentioned above by rsync) and use that, but not sure if that works always if versions differ too much. Dump and load should work all the times I think.
Thank you for your suggestions! I tried to to run svnadmin
and is available locally. I'll try as soon as possible (i.e. when I'll receive the dump from system administrators) and I'll be back with result I'll achieve.
When I run this migration is also possible to retrieve new updates from svn or, once the migration is completed, it won't be possible to get new commits from svn and migrate them to git? Just to know if the migration suppose that the svn repository won't be used anymore by committers and only the new git repository has to be used.
I don't know that. There are some open issues about incremental update. The tool can record some metadata into the commit messages, but I don't know if it can use it to continue a migration like git svn
. Sadly no idea.
I have locally an svn repository with the following structure: wiki
In the folder
svn2gitUtility
I have the configuration files and the executable ofsvn-all-fast-export
.This is the command that I'm running:
./svn2gitUtility/svn2git/svn-all-fast-export --identity-map=./svn2gitUtility/conf/wiki.authors --rules=./svn2gitUtility/conf/wiki.rules --stats --add-metadata wiki
Sample of
wiki.authors
:m.white = Mr White <mr.white@test.com>
Content of
wiki.rules
:Output
When I run the previous command, I get the following error:
I tried also to change permissions to the svn folder like stated in this StackOverflow question, but it didn't work.
Is there a problem in the configuration?