Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In our group we have a repository, we would like to move the repository, but in he meantime also we would like to delete some folders and re-indexing the revision(delete all the revision numbers which are related to the deleted folder) Is this possible? If yes How?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You should take the repository offline by stopping either svnserve or Apache.

Then dump the repository content to file using a command like

svnadmin dump repos-folder/ > repos-dumpfile

After that you can split the dump by filtering out the relevant changes by using the svndumpfilter tool. In the example below "my-branch" is the path within the repository that you want to put into a separate repository:

svndumpfilter include my-branch --drop-empty-revs --renumber-revs < repos-dumpfile > branch-dumpfile
svndumpfilter exclude my-branch --drop-empty-revs --renumber-revs < repos-dumpfile > nobranch-dumpfile

Then you can create the empty repositories for the filtered dump files and import the dump data:

svnadmin create repos-branch-folder
svnadmin load --ignore-uuid repos-branch-folder < branch-dumpfile
svnadmin create repos-nobranch-folder
svnadmin load --ignore-uuid repos-nobranch-folder < nobranch-dumpfile

You can find further information in the Repository Maintenance section of the excellent Subversion Book.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.