The ultimate subversion repository splitting guide

Initial situation: we have a repository in directory called ham. In the repository we have two subdirs called foo and bar. We want to split the repository into two separate repositories, called foo and bar. We want both new repositories to start with revision id 1 and increment continuously.

svnadmin dump ham > dump
svndumpfilter include --drop-empty-revs foo < dump >
svndumpfilter include --drop-empty-revs bar < dump >

sed -e "s/Node-path: foo\//Node-path: /" < >
sed -i -e "s/Node-copyfrom-path: foo\//Node-copyfrom-path: /"

sed -e "s/Node-path: bar\//Node-path: /" < >
sed -i -e "s/Node-copyfrom-path: bar\//Node-copyfrom-path: /"

At this point we edit the dump.*.fixed files to remove the lines which create the *-directory.

svnadmin create foo
svnadmin load foo <

svnadmin create bar
svnadmin load bar <

If original version numbers are to be kept, parameters of svndumpfilter can be adjusted.

back to front