My SVN repository contains several folders for different projects. ‘Desktop program’, ‘iOS app’, ‘Web app’ etc. All revision entries are shared between these (as it’s under one repository. Revision #100 might be on the ‘iOS app’ folder, revision #101 on the ‘Web app’ folder etc).
What I want is to roll back to an earlier version on just one of these folders. Usually this is done with a ‘reverse’ SVN Merge as it’s SVNs job to keep track of all history, even the bad times. I don’t want that however. Lets say I have twenty commits on ‘iOS app’ since revision #5. I want to rid these from history and I want that specific folder to return to revision #5. No one should ever again be able to check those twenty commits as they ‘never happened’. Is this even possible?
I have two different machines I am interacting to SVN with. A Windows PC with VisualSVN and a Mac with Subversion on Terminal level. I would be thankful for a solution on either.
From client side, there is simply no way to do this. No matter if commandline, Tortoise, or any other client.
If you have access to the server account that owns the repository, then there is some chance – but it is quite complicated and may involve a nontrivial manual work.
Roughly, these are the steps:
svn info http://svnserver/svn/repo– see the UUID linesvnadmin dump /path/to/repo > repo.dumpedit the dumpfile to exclude the commits
a) either open it in
viand delete your undesired commitsb) or use
svndumpfiltercommand to filter them by pathcreate new repository and import your modified repository into it:
svnadmin create /path/to/repo2svnadmin load < repo.dumpsvnadmin setuuid /path/to/repo2 THE_ORIGINAL_UUIDNow, check that repo2 is working fine and has the content that you expect. If so, you can remove
repoand renamerepo2->repo.Keep in mind that manual changes to the dumpfile are extremely prone to errors, and often these errors can be quite difficult to discover. It is usually bad idea to do things like this.