wespiserA
wespiserA

Reputation: 3168

svn update mechanism, dealing with potentially corrupt data

I am using an svn repo to keep my work files in sync between my local machine and server administered by someone else. Recently, I received notice that the server's storage was corrupt, and that not all corrupted files could be detected.

When I svn update, will svn be able to determine if files have been changed by means of corruption? What is the mechanism that svn uses to determine changes in files? I have a feeling that it uses the timestamp, although I can't confirm this.

My safest move right now is to re-checkout out the repo on the server, which is very time consuming and desirable to avoid.

Thank you very much for your time. Adam.

Upvotes: 0

Views: 833

Answers (2)

Mark Phippard
Mark Phippard

Reputation: 10419

You seem to be concerned about the server and repository right? Just have someone run svnadmin verify on the repository or run svnadmin dump to dump the repository to a dump file. If you do a dump, do not bother with verify. If these run OK, then the repository is fine.

These commands can only be executed from the server as they need direct access to the repository on the file system.

Upvotes: 1

boto
boto

Reputation: 455

SVN detects file modifications by diffing files. Afaik the file timestamps are not considered at all.

My safest move right now is to re-checkout out the repo on the server, which is very time consuming and desirable to avoid.

I do not understand right what you tried to explain, is there really a corruption of the repo on svn server or is your working copy corrupted? If the latter one is true then you can indeed try to

a) "clean" and then "update" your working copy or

b) first reverting your working copy then updating it or

c) check-out a new working copy.

If the svn repo is corrupted then you should at least backup your working copy asap just for the case that you cannot recover the svn repo on the server (in this case you would at least have a recent copy in your working directory and could try to setup a new svn repo and check-in the content of this working directory).

Upvotes: 3

Related Questions