[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invalid files in repository

From: Todd Denniston
Subject: Re: invalid files in repository
Date: Mon, 04 Feb 2008 11:16:57 -0500
User-agent: Thunderbird (X11/20071031)

Andreas H. wrote, On 02/02/2008 11:21 AM:

I have to administrate a repository, which was converted from another
RCS a few years ago.
Unfortunately something went wrong with the conversion. The repository
works fine and I can check in and check out the files I need.
But when I check the history, cvs crashes, because of some unexpected
end of file (for binary files)

BTW, which history do you mean?
cvs history
cvs log

My boss decided, that we don't need the whole history anyway and now I
need a method of getting the 'good' versions (including all the
branches and tags) into a new repository.

Is there an automated way to do that?
How would you approach that task?

A1) Not all the files have this problem.
A2) you can stop checkin and checkouts for a while. (otherwise you'll have to test on a copy, and when you figure out what you want to do, you'll need to get everyone out of the repo until you are happy with the changes.) A3) You'll work in either the actual repo or a new copy (marking the old directories as read only), so that you keep the directory structure and only get rid of the problem files. A4) you are either on the machine with the physical disk where the repo resides or you are using one of :ext:, :pserver:, :gsapi:.

1) make a verified backup of your repository. (this seems to just echo in my brain :).

2) make a list of all the files that you know cause problems.

3) run the validate_repo[1] or check_cvs[2] script [may exist in /usr/share/cvs/contrib/ on a RedHat/Fedora system] against your repository.
3.1) ask on this list why you have broken files.
the most common answer is: why did you have your repo on NFS, SMB, AFS and access it as a local file?

4) compare the answers from 2 & 3, if they are the same then you have (hopefully just a) few files that need help. These could be dealt with in a few ways: A) remove the current ,v file (loosing history) and add the current file as the new version. B) checkout every version of the file that you can recover and use rcs commands (which let you set things like date, author and revisions) to rebuild the broken file. C) Learn a bit about the RCS file format and remove the broken versions using an editor. (I have done this, but it is NOT for the faint of heart)

5) if either 3 found nothing or 2 had a few more files,
   What does the cvs status command look like for the problem files?
   What does the back trace of cvs look like in gdb?
   can you just use oen of the methods from 4 to fix it?

At the end, I want a valid CVS repository with all the files, attic,
branches and tags of the last 5 years.

Thanks in advance,

Use at your own risk.

[1]*checkout*/ccvs/contrib/ [2]

Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]