Ed Heal
Ed Heal

Reputation: 59997

Scrubbing part of a version tree in SVN

Got a project that is under SVN. No branches (as there was only two of us and I left one person in charge). How can I remove reversions from x onwards?

Upvotes: 0

Views: 164

Answers (2)

David W.
David W.

Reputation: 107040

You can do this the easy way or the hard way or the lazy-bones way:

  • Easy Way: Use the svn merge command to restore the build to the previous version. This is fast and quick, and you don't have to take the repository down. However, all the old history is still there.
  • Hard Way: You need to take the repository down, then do the following:
    • Dump the repository using svnadmin dump. You can use the r$first:$last to specify the range of revisions you want to dump.
    • Move the current repository to another location.
    • Recreate the repository using the svnadmin load command.
    • Restart the repository again. Now, you are missing all the bad revisions you wanted to remove.
  • The Lazy-bones Way: Wait until Subversion 1.8 comes out with the svn obliterate command.

Upvotes: 1

Bex
Bex

Reputation: 4918

Can you not right click and "update to revision"? and you can roll it back until before the other person started making changes, then resubmit it and it will be back at that version. I'm not sure you can actually delete all the revision from a certain date?

Upvotes: 0

Related Questions