info-cvs
[Top][All Lists]
Advanced

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

Re: Do most people checkout read-only and use "cvs edit"?


From: Mark D. Baushke
Subject: Re: Do most people checkout read-only and use "cvs edit"?
Date: Wed, 07 Jul 2004 15:48:02 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

JGentilin <address@hidden> writes:

> I don't believe the 'edit' does a lock on the server.

Why take it on faith when you have the source? 
Go and look it up if you wish. It is not much
of a 'lock', but for many definitions of the term
it is a 'lock' ...

The 'cvs edit' is an advisory lock. Use the
command 'cvs editors' to see who has the file
locked.

The 'lock' shows up as an entry in the repository
in the CVS/fileattr file in the same directory as
the file being locked.

Anyone who has a 'cvs watch' on the file will
cause the CVSROOT/notify script to be run when
someone does the 'edit' functionality.

> Quoting Vesperman's book:
> 
> "The cvs edit command is used as part of the cvs
> watch family of commands. If a file is being
> watched, it is checked out to the sandbox with
> read permissions but not write permissions. The
> edit command sets the sandbox file as writeable,
> notifies any watchers that the file is being
> edited, and sets the user as a temporary watcher
> to be notified if certain actions are performed
> on the file by other users"

The 'notifies any watchers' part is the one that
can get expensive.

> I did a quick check and a file that I did an
> 'edit' on did not show up with a lock using
> 'log'.

This does not show the 'lock', try using 'cvs
editors' for this purpose.

I never said that the locks were 'secure' or that
I suggest that anyone should consider using them
without a good reason and a good understanding of
what is happening.

        -- Mark

> "Mark D. Baushke" <address@hidden> wrote in message
> news:address@hidden
> Karr, David <address@hidden> writes:
> 
> > I'm not talking about locking. It's always
> > impractical to "check out with locks", in any
> > SCM.
> 
> Hmmm... 'cvs edit' implies locking, so, your
> question asked all of us about 'locking' even if
> you did not know that was what you were asking.
> 
> > I'm just talking about what happens in the
> > user's client view.
> 
> This is not what your message suggested.
> 
> > I was under the impression before that "cvs
> > edit" just affects the file in the user's client
> > view.
> 
> This is an invalid impression. A 'cvs edit'
> creates an advisory lock.
> 
> > Does this also lock the file on the server?
> 
> Yes it does.
> 
> -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFA7H2i3x41pRYZE/gRAgupAKCYum8AxWR/Hp/ZqnK/f+5ZDRscpwCgpQtW
hcyCB/UniYfQQSDpg+srF7o=
=9Ss5
-----END PGP SIGNATURE-----




reply via email to

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