Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing revision in SVN repository

Tags:

svn

svnadmin

Apparently one of the old revisions has disappeared from an svn repository:

svn checkout http... myrepo
svn: REPORT of '/svn/myrepo/!svn/vcc/default': Could not read chunk size: connection was closed by server (http://localhost)

$ svnadmin verify myrepo
* Verified revision 0.
...
svnadmin: No such revision 262

$ svn log -v -r 262
svn: No such revision 262

$ ll /var/SVN/myrepo/db/revs/0/
...
-rw-r--r-- 1 www-data www-data  27289777 2010-10-21 22:21 260
-rw-r--r-- 1 www-data www-data   4727180 2010-11-12 18:51 261
-rw-r--r-- 1 www-data www-data   2180586 2010-11-14 20:33 263
...

Searching on the issue says "restore from backup", but all 3 backups I have all have this missing revision, so it must have been going for a while. I only noticed it when I couldn't commit a specific file. I have a current working copy. What can I do short of starting from scratch ?!?

like image 989
dargaud Avatar asked Nov 29 '11 16:11

dargaud


People also ask

How do I find svn revision?

To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.

How can I get previous revision from svn?

Using the latest versions of Subclipse, you can actually view them without using the cmd prompt. On the file, simply right-click => Team => Switch to another branch/tag/revision.

What is a revision in svn?

Every time you commit a set of changes, you create one new “revision” in the repository. Each revision represents the state of the repository tree at a certain point in its history. If you want to go back in time you can examine the repository as it was at revision N.

How does svn revision number work?

Unlike most version control systems, Subversion's revision numbers apply to the entire repository tree, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change.


1 Answers

Do you have access to the raw repository? you can verify if the revision is missing by going into the repository folder, then under the db folder and you will see a series of folders. For rev 262 it will be in a folder '0' which contains all of the revisions from 0-999. It is possible to remove revisions from repositories with care. We have done this when a file or files were committed that for whatever reason were not supposed to be part of the repo. You can delete them using svn commands, but they can still be retrieved by specifying a revision. Is it possible that someone could have done an operation like this?

Word of caution- Mucking in the repository can cause problems even if you know what you are doing? You may want to make a copy of the repo prior to investigating to keep from corrupting it in case things go awry.

like image 126
Rob Goodwin Avatar answered Sep 22 '22 04:09

Rob Goodwin