OK, it had to happen sooner or later … some bone-head delete the trunk folder and committed this to the central repository!! Of course this happend 10 minutes before the final build of the first public test-release …
OK, so what to do now? First of all, check out a previous revision. OK, did that. So now check everything looks fine, everything builds just fine … OK!
So how to commit that to the repository? The repository know I checked out revision 125, but the latest revision is 126. So what next?
First make a backup of the repository (well, it’s kinda broken, but you never now what could happen next!!). Then dump everything up to revision 125:
svnadmin dump -r1:125 myrepo > my.dump
then create a new repository and load the dump:
svnadmin create myrepo svnadmin load myrepo < my.dump
This way you’ll end up with a nice and clean repository, which is up-to-date with revision 125 … and the bogus revision 126 is gone!!
This really made my day!!
You just made my evening 😀
I messed something up, and I just thankfull that I found this trick.
Thank You
Hi, you just made me realize that this is the right way when something went wrong in a commit (or range of them), sometime ago I wrote a similar article in my blog http://elespaciodejaime.wordpress.com/2010/07/14/mover-directorios-de-un-servidor-subversion-a-otro-mantenimiendo-las-revisiones/ where the procedure is almost the same but for moving folders from one repo to another, dumping, filtering and loading.
really thanx for that s*it, Ive just broke my main repo (Ive commited many many bad files) and dont know how fix it. I try with merge but It’s dont work to me. Thanx again
Good stuff indeed. I have a repo in which I wanted to take an older revision and start again from there. The only way I could find to do that without an “out of date” complaint was to dump up to the revision I was starting from (having already saved a full dump), delete the repo, create a new one, and load in the partial dump. I have not doubt there’s a better way to do this since I know almost nothing of SVN, but this got the job done quick. Thanks.
grazie mille !!
This is fantastic. Exactly what I was looking for. I went through all kinds of crud trying to get a previous version and commit with the same results as you had. This was so easy it took almost no time. If I had only thought to search for this before I wasted time trying other solutions.
Hi, cool. But nice to know, that this solution does not work on Powershell. In normal Windows command line works beatufiul.
Thanks
Well, my subversion is running on a linux box currently 😉
You really saved my life!
THANKS!