info-cvs
[Top][All Lists]
Advanced

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

Re: Why CVSREAD?


From: David L. Martin
Subject: Re: Why CVSREAD?
Date: Wed, 24 Jan 2001 21:26:52 -0600

----- 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.

Of course, the read-only permission can be manually changed
by the developer to writable, bypassing the cvs edit.  But that
wouldn't be playing fair, if you're using cvs edit as a means of
promoting communication among developers.

If you have set CVSREAD in your environment, then
the typical process for modifying a file would be:

1)  Identify a file that you want to edit, say foo.java.  It will
be read-only in your working area.
2)  >cvs editors foo.java
(to see if anyone else is editing the file; if
so, I should contact that person to discuss what changes are
currently being made and whether my changes might conflict
or if they can be made concurrently)
3)  >cvs edit foo.java
(makes the file writable and registers me as
an editor of the file)
4)  I make my changes.
5)  >cvs update foo.java
(In case someone checked in a revision which caused
my base revision to become outdated.  This should be
unlikely if no other editors were registered for foo.java)
6)  >cvs commit -m "Java is better than C++" foo.java
7)  Now foo.java is read-only again.

Regards,
David Martin





reply via email to

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