Once upon a time I had all my projects in one subversion repository. At first this looks simple, easy and useful. But after some time it will start to be a problem.
How can you fix your repository to have only one project in the repository. This is what I did, including sources that I used for help.
First I created a dump of the repository using the following command:
svnadmin dump <repospath> | svndumpfilter include \
--drop-empty-revs --renumber-revs <projectnamedirectory>
Then I used sed
and vim
to change the paths. I moved the whole project
directory into the root of the repository. I changed the Node-path
and
Node-copyfrom-path
entries in the dumpfile to match the new path.
Then I removed the first property entry in this file. It’s the one that
contains an empty Node-path
.
Then I used
svnadmin create <newrepospath>
svnadmin load <newrepospath> < dumpfile
to create and load the new repository. Works great.