[Top][All Lists]

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


From: Richard Wesley
Subject: Re: Why CVSREAD?
Date: Thu, 25 Jan 2001 11:58:28 -0800

Lo, on Wednesday, January 24, David L. Martin did write:

 ----- Original Message -----
 From: "Richard Cobbe" <address@hidden>
 > What's the CVSREAD variable for?
 > I know what it does, but I was (and remain) hard-pressed to come up with a
 > situation in which this behavior would be useful.  I'm assuming that such
 > situations exist; could someone provide an example?

 This is typically used when you want to loosely enforce the rule
 that developers should do a cvs edit prior to actually working on
 a file.  Cvs edit makes a read-only file writable in addition to
 registering the developer to be an editor of the file.


Sounds reasonable enough.  But, rather than checking out *every* file
read-only, why not use `cvs watch on'?  According to section 10.6.1 of the
Cederqvist (node `Setting a watch'), applying this command to specific
files will cause those files (and no others) to be checked out read-only,
requiring a `cvs edit' to make them read-write.

Assuming that you want to have watch on all files, then maybe CVSREAD is a little less baroque. But maybe not ;-)

Your comment also sort of implies that all projects are as organized as yours, which isn't always the case. CVSREAD as a default makes a lot of sense here to provide a basic setup that is easy to configure.

Is CVSREAD perhaps a holdover from an earlier version of CVS that didn't
support watches?

I believe so.

I actually have had a very odd use for it. Some VCS integration systems (e.g. CodeWarrior) require a "checked in" state and read-only is a very useful way to fake this so that CVS can be shoehorned into such systems. By setting the CVSREAD environment variable, I can make the files have the kinds of state that the IDE requires without mucking up the watchers state.

- rmgw

Richard Wesley           Electric Fish, Inc.       address@hidden

"Grownups have the most uninteresting explanations for things."
                 - C. S. Lewis, _The Magician's Nephew_

reply via email to

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