Merge unversioned directory structure into SVN repository

svn, unix

Solution

The fs2svn tool, part of svn2svn does the basics of what you're looking for. Start with this post.

Problem

I committed a 3rd party project into my own svn repository. Now, I got a new version of that project and I'd like to substitute it in my repository. The project is quite big (1.2GB) and the new version has new files/directories and also deleted files/directories. The trivial solution is ``` svn rm project mv /path/to/new/project . svn add project svn ci ``` However, I loose the history for everything. Additionally, the svn server won't be able to use delta-compression (Yes, server space does matter). Another way is to just overwrite all files in the working directory and then commit it. However, the deleted files remain in the repository. `svn add --force *` also "forgot" to add some files. What are the other possibilities to commit the new version? Is this an unusual use-case so there is no built-in support for this? (With Tortoise SVN I'd mess around with the `.svn` folders, Tortoise offers to delete missing files/folders in the commit dialog, but the command line version refuses to commit if it encounters files/folders not deleted using `svn rm`) Extra 1: How to avoid changes in my repository to be overridden? (There only few, so re-applying is acceptable at the moment) Extra 2: I replaced all symlinks with copies of the destination (To get rid of `special status changed` errors). How to avoid this? Extra 3: How to cope with renamed files/directories? Since I just get the new version without change history, it is impossible to determine those automatically. `svn mv` before committing?

Original source