views:

246

answers:

5

I have a subversion repository that I committed to and it's hard drive crashed. My latest backup is one revision behind. I can't commit to the backed up repository because the working copy is one revision ahead. How do you fix this?

+4  A: 

You might try checking out the latest revision and then manually copy changes to its working copy from your current working copy (which is one revision ahead). Then you should be able to commit normally.

petr k.
I made a backup, checked it out, updated the files with Beyond Compare...checked it. Thanks!
craigmoliver
A: 

If I understand your question correctly (I'm not certain that I do), you should be able to use the --force flag:

svn commit --force -m "Reverting to the pre-backup copy"

Alternatively, you could check out a working copy in a different directory and move all of the non-.svn files to the new working copy.

cpharmston
A: 

I think the simpliest way would be: copy the changed files from you working copy somewhere. Then checkout to the -1 revision. And then copy files back and commit.

Sergey Olontsev
A: 

Check out a copy of the backup, then copy all working-copy files over that copy, then commit. If you have working copy changes, you can commit them separately by producing a patch in the old working copy, and reverting that patch in the new one, then committing, then reapplying the patch again.

Martin v. Löwis
+2  A: 

A hacky way is to:

  • Copy your working copy to another folder
  • Delete the .svn folders from the copy.
  • Delete the working copy.
  • Check out the backup.
  • Copy your working copy over the checked out version.
  • Commit your changes.
Rich Seller
honestly, I'd probably do this
Allen