Subversion calamity

May 28, 2010 16:57

Assuming that the Subversion command:
svn rm http://repos/company/projects/project/tags/trivia

has magically(sic) been run instead as
svn rm http://repos/company/projects/project/Does anyone know ( Read more... )

geek, lazyweb

Leave a comment

brooksmoses May 28 2010, 16:43:02 UTC
A couple of solutions.

First is to do an "svn cp" of the tree from the revision prior to that "svn rm" command back into its current location. Given SVN, that's a very cheap copy, but it'll break a lot of "svn log" information. If you don't care, that's the way to go. (I've done this before.) Something like:

svn cp http://repos/company/projects/project@REV http://repos/company/projects/projectAlternate solution if you really want it reversed is to make both a full and incremental backup of the current state, then restore the whole repository from your most-recent full backup before the undesired command, and then replay the incremental backup into that, stopping at the revision just before the desired command. Depending on how recent that most-recent full backup is, that may or may not take a while -- if you don't have one, I think you'd basically get to replay from start, which will work but take a while. The full backup of the current state is just for recovery if this goes pear-shaped. (I haven't done this before, but I've seen it done when I broke a repository in a similar fashion.)

Edit to add: Third solution: Ask on ServerFault. You should get a more-detailed answer pretty quickly.

Reply

quercus May 28 2010, 18:01:18 UTC
Monumentally helpful, thankyou!

(I'd found most of this already, but not one crucial little snippet)

Reply

brooksmoses May 28 2010, 18:34:42 UTC
You're welcome! Out of curiosity, what was the crucial missing piece?

Reply

quercus May 30 2010, 21:00:13 UTC
@ revision rather than -r revision ! Simple, but that kills it with a misleading error message and a 403 permissions error

Reply


Leave a comment

Up