Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I checkout a CVS repo on my local machine?

Tags:

cvs

Crunch: Can I checkout a repo that is on a drive mapped on my local machine, without having a server running on that directory?

Fluff: I am new at using CVS. I am working on an old project, where all of the original developers are either not with us anymore or have forgotten how they worked on it. After much tribulation, I finally found where the source code for the project is (on a communal drive that I have mapped on my local filesystem), but it is a CVS repo. How can I check this code out, so that I can actually work on it?

I am using a Windows 7 system.

like image 829
GreySage Avatar asked Feb 06 '23 23:02

GreySage


1 Answers

Usually this is as simple as:

cvs -d /path/to/repo checkout .

I have assumed use of a *nix system, and this also "just works" if one is using an MSYS environment on a Windows system. The primary difference under MSYS is understanding how drive letters are represented. The following example assumes the repository is on the C: drive.

cvs -d /c/path/to/repo checkout .

The principle also follows if one elects to use cygwin instead of MSYS, but cygwin uses a different method of referencing drive letters:

cvs -d /cygdrive/c/path/to/repo checkout .

Note that if one is unfamiliar with Windows GNU environments like MSYS or cygwin, it may be pertinent to note that MSYS is a "minimalist" GNU environment implementation and cygwin is decidedly not "minimalist". This could mean that MSYS may present less of a challenge to a new adopter - the "minimalist" aspect of MSYS will have no negative impact relative to using it for its CVS client.

A potential complication with using CVS clients on Windows is that most tend to change the line termination format of checked out text files to match the format generally used in the client environment. By way of explanation, if source files were originally checked in with LF delimiters, many, or most, CVS clients running under Windows will check out the files with CRLF line-termination. While this can work fine, it can also create issues in the event that the compiler or build environment is sensitive to line termination. The respondent has experienced numerous situations where such translation did more harm than good.

Unlike many or most other CVS clients, the MSYS cvs implementation DOES NOT translate line termination of text files on checkout. If a file in the repository has LF line-terminators, the checked out copy has LF line-terminators, and if the repository copy is CRLF terminated, the checkout out copy will be too. (Though, one may use dos2unix and/or unix2dos utilities to change the format of the checked out files.)

Caveat: The respondent has an MSYS bias and uses MSYS routinely in an engineering environment; when additional functionality provided by Cygwin is needed, the respondent prefers use of a *nix system over a Windows system.

like image 145
kbulgrien Avatar answered Feb 27 '23 13:02

kbulgrien