I have some artifacts in my repository that should never have been added; I need to deliver a copy (an svn dumpfile) of the repository to theclient with all evidence of those items scrubbed.
Here is a list of some of those items:
- incorrect license language
- source code for which we have no license
- incorrect authorship
- directly structure not appropriate for conversion to git
Can SVNKit help with any of these?strong text
usually this is done using native Subversion’s svnadmin command. It is often referred to as “svnadmin dump/load” procedure.
The commands are the following:
svnadmin dump -r1:$REV path/to/svn/repository > repo.dump
svnadmin create path/for/filtered/repository
svnadmin load path/for/filtered/repository < repo.dump
These commands create a new repository from [1:REV] revisions range of the old repository.
E.g. if you want to filter out the latest revision, you can set the REV to HEAD-1.
If the artifacts you want to filter out are not in the last several revisions but in the middle of the history, you can use one of the following “standard de facto” tools instead:
svndumpfilter - it is a part of native Subversion and is used in combination with “svnadmin dump/load” approach;
svndumptool python script.
There’re also other (less popular) variations of these tools, but I would recommend you to keep to those two.
So you can achieve your goal with native Subversion and I recommend you to do so. What about SVNKit - it’s a Java implementation of native Subversion. If you really want to use SVNKit instead of native Subversion, you can use it. Its command line version contain ‘jsvnadmin’ utility which is a complete analogue of native Subversions’s ‘svnadmin’. There’s also my old SVNKit-based project svnkitfilter which also allows to go through a repository and make modifications to it, you can use it as the base and modify it to meet your requirements.
But I would recommend you to keep the standard native Subversion-based tools.