svnvisualsvn-serversvnadminsvndump

VisualSVN Corrupt representation after deleting bad commit


After following https://groups.google.com/forum/#!topic/visualsvn/2LpBN8qtEfM


The below procedure describes how to “undo” the last commit to an svn repository (fsfs backend) in an extreme case: (Please test it thoroughly on a “test” repo in your environment before actually applying it) Assuming the bad revision number is $BAD_REV

  1. Stop the visual svn server.
  2. Backup all your repos (to save from an unfortunate scenario, if it happens)
  3. Go to the “Repositories” folder.
  4. Select the particular repo in which you need to “undo” the last commit.
  5. Edit db/current and decrement the first number. That’s the HEAD rev.
  6. Delete db/rev/$BAD_REV
  7. Delete db/revprops/$BAD_REV
  8. Start the visual svn server.

Caution: Ask all the users to delete the checkouts which used $BAD_REV and check out afresh using ($BAD_REV minus 1).


After the second commit after this procedure, I got the following error:

Error Commit failed (details follow):
Error Corrupt representation '199 10142 111 1475 (null)
Error d18718662872fab9aa981c20a47921768f567189 (null)

Not sure how to solve this and I do not want to create a new repository.


Solution

  • It seems deleting the rep-cache.db file in the repository folder did the trick.
    "Representation" led me to believe it was cached somewhere.

    Hope this fix lasts, and I hope I was able to help someone else in a similar situation.