I want to split a directory from a large Subversion repository to a repository of its own, and keep the history of the files in that directory.
I tried the regular way of doing it first
svnadmin dump /path/to/repo > largerepo.dump
cat largerepo.dump | svndumpfilter include my/directory >mydir.dump
but that does not work, since the directory has been moved and copied over the years and files have been moved into and out of it to other parts of the repository. The result is a lot of these:
svndumpfilter: Invalid copy source path '/some/old/path'
Next thing I tried is to include those /some/old/path
as they appear and after a long, long list of files and directories included, the svndumpfilter completes, BUT importing the resulting dump isn't producing the same files as the current directory has.
So, how do I properly split the directory from that repository while keeping the history?
EDIT: I specifically want trunk/myproj
to be the trunk in a new repository PLUS have the new repository include none of the other old stuff, ie. there should not be possibility for anyone to update to old revision before the split and get/see the files.
The svndumpfilter solution I tried would achieve exactly that, sadly its not doable since the path/files have been moved around. The solution by ng isn't accetable since its basically a clone+removal of extras which keeps ALL the history, not just relevant myproj history.
I've tried at least 4 different applications to do that, the only that really worked was using svndumpfilterIN :
Here is what I tried and didn't worked :
I had a similar problem splitting a repository ..
What I did to get around the problem was to include the additional old directories that is was requesting, or that you know you moved. In my case I had moved 3 directories into another directory.
eg. Moved Folders A,B,C in to Folder D
This seemed to solve my problem. I was able to separate Folder D from the rest of the Repo. On the flip-side, when excluding D I did not get the error, I would guess because removing D didn't require the links/history to A,B,C
I see this is quite old now, but does adding "--skip-missing-merge-sources" help any? It seems like it might...
I've just successfully migrated a project from an existing combined repo (at Google Code) to its own repo. The posts here were very helpful.
This is what finally worked for me...
svnadmin dump to foo-dumpfile
cat dumpfile | ./svndumpfilter3 --untangle mymirrorrepo trunk/foo > foo-dumpfile
svnadmin create foorepo
svnadmin load foorepo --ignore-uuid < foo-dumpfile
The
--untangle
option in step 3 managed to resolve all of the path problems that stumped svndumpfilter and svndumpfilter2.Initially, at step 5 I was stuck on the error:
But this post in Charles Calvert's blog explained that all that was required was to create the trunk dir in foorepo before doing the load.
Some more info about svndumpfilter and how to fix - http://blog.rlucas.net/uncategorized/some-gotchas-with-using-svndumpfilter/
Or you can try svndumpfilter replacement script, now called as svndumpfilter2 - http://cogo.wordpress.com/2009/03/10/problems-with-svndumpfilter/
I didn't tried that script, coz i need some time to make a repo backup, to test in on that (i have a backup dump to play with but on Windows, and it is a linux script).
auriarte's link to svndumpfilter3 404's. Here's a working link (as of 2011-01-31), for anyone looking for it: http://furius.ca/pubcode/pub/conf/bin/svndumpfilter3.html