views:

30

answers:

3

Our tortoiseSVN repository unfortunately became corrupt today due to a disk glitch.

We have a good working copy based off revision 2897. Our most recent backup repository is from revision 2848.

We would like to salvage as much as possible of the history, rather than start a new repository.

So, can we do this by committing the working copy directly to the older backup repository ?

+1  A: 

If I am not missing anything, I do not see any problem in such a commit. Only that you will not have history details for the commits between the 2 revisions.

thedev
SVN might hiccup due to the working copy having a higher revision number than the repository. If so, you can remove the `.svn` folders from (a copy of) the working copy you have, and copy that over a fresh checkout. This, however, will lose any changes other than those made to the code (such as properties).
sbi
A: 

You've lost your commit history, since revision 2848. Subversion working copies only keep local state....

Dependent on how you restore your repository you might also experience commit problems due to a mis-matching repository UUID. The svn switch command can be used to indicate a change of repository. Another option is to use tortoiseSVN to create a patch of the changes since revision 2848 and apply this to a fresh checkout.

Mark O'Connor
Note that the patch will not have any changes other than to code (properties etc.), make sure you're not losing something important this way.
sbi
Your comment on property changes is well made. Let's face it impossible to fully and faithly construct a repository from a checkout. One of the selling points of the DVCS systems like Git is that they keep **all** history locally.
Mark O'Connor
+1  A: 

This happened to me as well, I had to checkout a fresh copy, as svn got a real hickup when my local version was newer than the server. When you have checked out a new copy, copy the files from what you had locally over your new copy (make sure you don't copy the .svn folders), and commit. You will loose history between 2848 and 2897

rlovtang