Recovering files from archive of CVS *,v files
Asked Answered
J

6

11

I trying to recover some old source code (plain text) from a bunch of files that used to be managed with CVS. I have a directory containing all of the source code files in CVS's *,v file format. This looks mostly like the original files, but there are quite a bit of CVS specific header and revision information in there.

Is there a simply way to strip out all the CVS stuff and just keep the latest revision of the file?

Jonson answered 15/2, 2010 at 18:11 Comment(0)
E
7

Yes, install a CVS client, set environment variable CVSROOT to point to the root of your repository, and type cvs checkout dir where dir is a top level directory in your repository.

If for some reason you only have individual ,v files, they are in rcs format, so if the rcs program is installed it should be able to get the tip revision out of any ,v file.

Encyst answered 15/2, 2010 at 18:28 Comment(0)
E
19

You don't even need to use cvs. cvs was just a front end to rcs, and the *.v files are really rcs files. Just check them out. eg, if you have foo,v just execute:

co foo

and it will checkout foo from the *,v file

Ecology answered 15/2, 2010 at 18:36 Comment(0)
E
7

Yes, install a CVS client, set environment variable CVSROOT to point to the root of your repository, and type cvs checkout dir where dir is a top level directory in your repository.

If for some reason you only have individual ,v files, they are in rcs format, so if the rcs program is installed it should be able to get the tip revision out of any ,v file.

Encyst answered 15/2, 2010 at 18:28 Comment(0)
J
6

Latest windows binary can find here:

https://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/

For example: Place your reposity files here: c:\cvs (like c:\cvs\PROJECT create c:\cvs\CVSROOT

create c:\work save cvs.exe here

run:

cvs -d c:\cvs checkout PROJECT
Jew answered 18/8, 2016 at 13:59 Comment(0)
V
0

Try to setup CVS client and read your files as local CVS repository.

Vlad answered 15/2, 2010 at 18:16 Comment(0)
A
0

Depending on your platform, you might find rcs to work well, as long as you're looking at only a few files at a time. On many Unix/Linux systems, if my memory serves, you could use the co (checkout) command straight from the command line.

Or you could take advantage of the fact that CVS and rcs store the latest version of the file on head near the top of the file, and any other revisions are created by applying diffs internally. Therefore, you can probably strip out the latest version easily using a text editor, and possibly automate it with a perl script. This trick won't work for any other version.

These are options in case there's problems with quick installing a CVS server (if one isn't already installed; they tend to come with Unix-like systems) and checking out.

Accidence answered 15/2, 2010 at 18:36 Comment(0)
H
0

This normally happens when someone makes check-ins ,updates files and u r accessing the directories/files.

This worked for me- Simply close the terminal and open a new one.foo,v files will disappear and proper files would be shown.

Hover answered 7/5, 2020 at 6:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.