info-cvs
[Top][All Lists]
Advanced

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

Re: sleep 2 in loginfo example


From: Noel L Yap
Subject: Re: sleep 2 in loginfo example
Date: Thu, 2 Nov 2000 14:25:56 -0500

I think the problem is that if CVS is not able to acquire a lock, it'll sleep
for 30 seconds.  This is way too long for the purpose given.

Also, the example given in the manual is a read-only operation (ie "cvs up").
This is completely different than what you're trying to do.

Ideally, the original lock should still exist when you perform your rtag
operation so that noone else will be able to do anything between the time the
checkin ends and the time the rtag begins.

The only way I've been able to do this was to create symlinks within the
repository and do CVS operations on these symlinked modules.  For example:
ln -s $CVSROOT/module $CVSROOT/module~
cvs rtag TAG module~ # or whatever the syntax is, I've forgotten
rm $CVSROOT/module~

Of course, you'll have to use LockDir to get this to work right since the module
lock exists within the directory being locked.

Hope this makes sense,
Noel




address@hidden on 2000.11.02 12:40:06

Please respond to address@hidden

To:   address@hidden
cc:   (bcc: Noel L Yap)
Subject:  sleep 2 in loginfo example




The CVS manual speaketh thusly:

"C.7.2 Keeping a checked out copy

"It is often useful to maintain a directory tree which contains files
which correspond to the latest version in the repository. For example,
other developers
might want to refer to the latest sources without having to check them
out, or you might be maintaining a web site with CVS and want every
checkin to
cause the files used by the web server to be updated.

"The way to do this is by having loginfo invoke cvs update. Doing so in
the naive way will cause a problem with locks, so the cvs update must be
run in
the background. Here is an example for unix (this should all be on one
line):

^cyclic-pages           (date; cat; (sleep 2; cd /u/www/local-docs;
 cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1

"This will cause checkins to repository directories starting with
cyclic-pages to update the checked out tree in `/u/www/local-docs'."

I'm interested in the "sleep 2" command.  I understand needing to run
cvs update in the background to avoid locks.  I don't see what the sleep
2 is for.

(I'm writing a script to automatically cvs rtag commits, and am trying
to figure out the sanest way to do it.)

Cheers,
Laird

--
W: address@hidden / P: address@hidden
http://www.amherst.edu/~ljnelson/
Good, cheap, fast: pick two.

_______________________________________________
Info-cvs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/info-cvs







This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.




reply via email to

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