0

Ok, so I'm still getting used to this SVN business. I basically took a dump in my repository right around New Years. I thought it would be a good idea to restructure my website's codebase in preparation for implementing some OOP changes. The only problem was, in my foolishness, I did this directly in My Computer rather than through my IDE. The next commit was FUBAR... so I committed again, and again.. and well, yeah basically just took a dump in my repository.

SO, having beaten my repository to a pulp-like state utterly unparsable by NetBeans, I turned to TortoiseSVN to dig down to and check-out my last sane commit. That was about 5 commits earlier in the chain.

I'm currently downloading that. And I'm wondering how I can nuke all the commits that came after this one and pretend that whole series of idiocy just never happened.

Thanks for any help you can provide. I'm hosted at SlikSVN if it matters. (I suspect it does not...)

3
  • 4
    In Tortoise SVN you select a set of commits you don't like and say "revert changes from this revision" - it perfroms reverse changes to your working copy, then you commit those reverse changes. I'm pretty sure the tools you use can do the same once you find which exact buttons/commands to use. Commented Jan 12, 2011 at 12:42
  • I think the asker means to really make the revisions disappear inclusive from history. Commented Jan 12, 2011 at 12:48
  • @sharptooth - running that now, we'll see how it goes. Alas, SO reorders tags based on popularity. Originally I had dump into svn ... sigh Commented Jan 12, 2011 at 13:01

2 Answers 2

1

If you really want to erase the history from the server up to a given revision, I would create a new fresh repository and svnsync to it up to the revision that was ok. Then copy the uuid file to the new repository (to have a matching uuid) and then relocate your working copy to the new repository - AFTER having updated (yes that's how it's called in the tortoise GUI!) to the older revision that is present in the new repository.

A tedious alternative is to take a full dump, delete the revisions you don't need at the end and load it again. But take care that the dump must remain consistent. Deleting revisions in-between might cause trouble.

Sign up to request clarification or add additional context in comments.

Comments

1

Take a look at this TortoiseSVN help topic: Roll back (Undo) revisions in the repository.

Currently there is no way to easily remove revisions permanently from the revision history, although SVN might one day grow this feature.

4 Comments

-1: User wants to remove the revisions that he tried to work with from the repository. TortoiseSVN cannot do this! This can be accomplished very easily (since he has admin rights to the server where the repos are stored) using the techniques outlined by jdehaan in his answer.
@jgifford25: he is working from a checkout. From the question: " turned to TortoiseSVN to dig down to and check-out my last sane commit". Also, I'm aware of both the "svnadmin dump/load" and svnsync solution to remove offending revisions. But given the chain of events that lead to the question I'm pretty sure that the OP is not comfortable doing either and would not describe either solution as "easy".
Also, the obliterate feature request would not exist if people considered the existing solutions "easy".
Finally, destroying repository history should be a last resort only used to remove confidential information or very large files that were committed accidentally. This is not something you should be doing as a matter of habit for all your mistakes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.