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 com开发者_如何学Pythonmitted 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...)
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.
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.
精彩评论