Search code examples
svnrepositorycorruption

How can a SVN repository become corrupt?


A few times already, I got into situations where one of my SVN repository got corrupt and we could do anything with some versions or branches of the project without really knowing what we did. So I'm asking what can cause a repository to become corrupt?


It seems that incompatibilities between clients may cause problems, more specifically with character sets.


Solution

  • There are basically three distinct cases:

    1. Faulty hardware (memory, fs corruption, etc.)
    2. User's with login access to the server can corrupt repository files.
    3. Bugs in Subversion.

    Faulty hardware is usually the most difficult to spot, except in the most obvious cases. Case 2 is preventable by limiting login access to the server. Everything else is a bug in Subversion. (This includes compatibility issues between client and the server.) You should never be able to corrupt the repository just by using a Subversion client (not even when there is a bug in the client, IMO).