Reputation: 103
Due to a human error, we had to restore svn data on server from a backup. The backup is 1 day old.
What happens when someone commits with a higher rev number than the server version? How should we mediate this problem?
Upvotes: 3
Views: 451
Reputation: 83635
Just tested this with a local repository. I created a repository with a few commits, created a backup copy of the repository folder, added another commit, then replaced the repository folder with the old backup copy.
After restoring the repository to its old state (with an old revision), the behaviour is as follows:
svn update
or svn log
. They will get an error message: "svn: E160006: No such revision xxx".svn up
, since they already have a (different) commit with that revison number. Hence, working copies will diverge.TL;DR:
This is not supported by Subversion. All existing working copies must be discarded (and checked out anew).
If working copies have uncommitted changes, these should be saved (e.g. using svn diff
- but beware of limitations such as moved files) and re-applied to the fresh checkout.
Upvotes: 2