automatic checkout

2003-09-16 Thread Roderick Bloem
Hi,

I want to use cvs for a directory that contains scripts.  I don't want 
everyone to change the scripts in the directory: I won't have 
accountability.  Thus, it is under cvs.  People should check out, 
change, and submit.  I don't want them to write to the directory itself, 
because they will forget to check in.

I would like changes to propagate to the script directory immediately. 
Everytime someone commits, an update would be executed in the script 
directory.  Is that possible?

I have tried a loginfo script, but there is a problem with the locks: 
the cvs update runs when the commit has not released the lock yet.

I have looked on the web and found some references, but nothing very 
satisfactory.  I have seen ACU, but it seems more concerned with 
managing multiple machines (which is not a problem), than with the 
lock.  I have also thought about putting a pause into the script that 
does the update, but that does not seem very safe, not do I know how to 
do it.  (My shell programming is bad, and I don't know how to spawn a 
process from loginfo.)

Is there a good solution for this?  Should I consider a different setup?

Thanks,

Roderick Bloem



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: automatic checkout

2003-09-16 Thread Mark D. Baushke
Roderick Bloem [EMAIL PROTECTED] writes:

 I want to use cvs for a directory that contains scripts.  I don't want
 everyone to change the scripts in the directory: I won't have
 accountability.  Thus, it is under cvs.  People should check out,
 change, and submit.  I don't want them to write to the directory
 itself, because they will forget to check in.

That sounds like a people managment problem...

 I would like changes to propagate to the script directory immediately.
 Everytime someone commits, an update would be executed in the script
 directory.  Is that possible?

Not directly as the loginfo script is being run while you have all of
your commit locks.

 I have tried a loginfo script, but there is a problem with the locks:
 the cvs update runs when the commit has not released the lock yet.

Correct.

 I have looked on the web and found some references, but nothing very
 satisfactory.  

No surprise there, there is no 'magic bullet' in this case.

 I have seen ACU, but it seems more concerned with managing multiple
 machines (which is not a problem), than with the lock. I have also
 thought about putting a pause into the script that does the update,
 but that does not seem very safe, not do I know how to do it. (My
 shell programming is bad, and I don't know how to spawn a process from
 loginfo.)

Spawning a process from loginfo for this purpose is a bad idea as it
will wait for its children before clearing the lock. Using tricks to
background a grandchild process might work, but may not be reliable
in all cases.

 Is there a good solution for this?  Should I consider a different setup?

I suppose you could have e-mail notification sent to an e-mail address
for which the .procmailrc (or equivalent) will always do a 'cvs update'
on the script directory if it sees any mention of the script directory
in the log message...

Good luck,
-- Mark


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: automatic checkout

2003-09-16 Thread Steve deRosier
How about a script on a cron job that periodically (whatever granularity 
you require from 1 minute to 1 day) checks to see if there's been any 
new updates and if so does an update to the production tree?  Seems 
like a rather clunky work-arround, but it should at least get the 
results you're looking for.

- Steve

Roderick Bloem wrote:
Hi,

I want to use cvs for a directory that contains scripts.  I don't want 
everyone to change the scripts in the directory: I won't have 
accountability.  Thus, it is under cvs.  People should check out, 
change, and submit.  I don't want them to write to the directory itself, 
because they will forget to check in.

I would like changes to propagate to the script directory immediately. 
Everytime someone commits, an update would be executed in the script 
directory.  Is that possible?

I have tried a loginfo script, but there is a problem with the locks: 
the cvs update runs when the commit has not released the lock yet.

I have looked on the web and found some references, but nothing very 
satisfactory.  I have seen ACU, but it seems more concerned with 
managing multiple machines (which is not a problem), than with the 
lock.  I have also thought about putting a pause into the script that 
does the update, but that does not seem very safe, not do I know how to 
do it.  (My shell programming is bad, and I don't know how to spawn a 
process from loginfo.)

Is there a good solution for this?  Should I consider a different setup?

Thanks,

Roderick Bloem



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: automatic checkout

2003-09-16 Thread Frederic Brehm

I would like changes to propagate to the script directory immediately. 
Everytime someone commits, an update would be executed in the script 
directory.  Is that possible?


http://www.cvshome.org/docs/manual/cvs-1.11.6/cvs_18.html#SEC173

___
Frederic W. Brehm, Sarnoff Corporation, http://www.sarnoff.com/


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Writing shell scripts that use CVS / Automatic checkout

2000-03-14 Thread Mikael Grave

Hello,

I am currently writing a small Shell script that will log into my CVS
respository and will issue a checkout. This script is intended to be
called every 10mn by a crontab.

Since "cvs login" does not have a command line option to pass the
password, I was wondering if there is a simple trick to run "cvs login"
automatically? I have tried things like:

echo "x" | cvs login

But it does not work (the password is not taken from the buffered stdin
I guess).

My original purpose was to perform an automatic checkout (in a test bed)
every time someone was doing a commit. Doing this with "commitinfo" did
not seem possible since "cvs commit" recursively commit all modified
files, if 100 files are commited at once, I don't want commitinfo to
launch 100 checkouts (maybe should I simply run one "update" per
"committed" file?). So I decided to go for a crontab (not as good, user
may have to wait 10mn to see their changes published in the test bed).

Any help or trick are welcome. I guess my problem is quite common. Hope
my questions are not too stupid :)

Cordially,

Mikael
-- 
Mikael Grave Tel. (613) 731-4046  http://www.webmotion.com
Webmotion Inc.   Fax. (613) 260-9545[EMAIL PROTECTED]
`'



Re: Writing shell scripts that use CVS / Automatic checkout

2000-03-14 Thread Donald Sharp

Write a wrapper script around the commit.  All it does is this:

1)  cvs commit files
2)  if successfull on commit
  - update test tree.
  
donald
On Tue, Mar 14, 2000 at 09:17:36AM -0500, Mikael Grave wrote:
 Hello,
 
 I am currently writing a small Shell script that will log into my CVS
 respository and will issue a checkout. This script is intended to be
 called every 10mn by a crontab.
 
 Since "cvs login" does not have a command line option to pass the
 password, I was wondering if there is a simple trick to run "cvs login"
 automatically? I have tried things like:
 
 echo "x" | cvs login
 
 But it does not work (the password is not taken from the buffered stdin
 I guess).
 
 My original purpose was to perform an automatic checkout (in a test bed)
 every time someone was doing a commit. Doing this with "commitinfo" did
 not seem possible since "cvs commit" recursively commit all modified
 files, if 100 files are commited at once, I don't want commitinfo to
 launch 100 checkouts (maybe should I simply run one "update" per
 "committed" file?). So I decided to go for a crontab (not as good, user
 may have to wait 10mn to see their changes published in the test bed).
 
 Any help or trick are welcome. I guess my problem is quite common. Hope
 my questions are not too stupid :)
 
 Cordially,
 
 Mikael
 -- 
 Mikael Grave Tel. (613) 731-4046  http://www.webmotion.com
 Webmotion Inc.   Fax. (613) 260-9545[EMAIL PROTECTED]
 `'
 



Re: Writing shell scripts that use CVS / Automatic checkout

2000-03-14 Thread Karl Fogel

Well, one thing you can do with the latest CVS is set up an anonymous,
read-only repository user with an empty password (as described in the
documentation) and issue your checkout as that user.  As long as both
client and server are recent (1.8 or higher), you will not be prompted
for a password at any point.

To get the latest CVS, do

cvs -d :pserver:[EMAIL PROTECTED]:/home2/cvsroot login
   password "guest"
cvs -d :pserver:[EMAIL PROTECTED]:/home2/cvsroot co ccvs

-K

Mikael Grave [EMAIL PROTECTED] writes:
 I am currently writing a small Shell script that will log into my CVS
 respository and will issue a checkout. This script is intended to be
 called every 10mn by a crontab.
 
 Since "cvs login" does not have a command line option to pass the
 password, I was wondering if there is a simple trick to run "cvs login"
 automatically? I have tried things like:
 
 echo "x" | cvs login
 
 But it does not work (the password is not taken from the buffered stdin
 I guess).
 
 My original purpose was to perform an automatic checkout (in a test bed)
 every time someone was doing a commit. Doing this with "commitinfo" did
 not seem possible since "cvs commit" recursively commit all modified
 files, if 100 files are commited at once, I don't want commitinfo to
 launch 100 checkouts (maybe should I simply run one "update" per
 "committed" file?). So I decided to go for a crontab (not as good, user
 may have to wait 10mn to see their changes published in the test bed).
 
 Any help or trick are welcome. I guess my problem is quite common. Hope
 my questions are not too stupid :)
 
 Cordially,
 
 Mikael
 -- 
 Mikael Grave Tel. (613) 731-4046  http://www.webmotion.com
 Webmotion Inc.   Fax. (613) 260-9545[EMAIL PROTECTED]
 `'



Re: Writing shell scripts that use CVS / Automatic checkout

2000-03-14 Thread Larry Jones

Mikael Grave writes:
 
 Since "cvs login" does not have a command line option to pass the
 password, I was wondering if there is a simple trick to run "cvs login"
 automatically? I have tried things like:

You don't need to login every time you run a cvs command, the username
and password are stored in ~/.cvspass so you only have to login once. 
All you need to do is to manually do the "cvs login" once as the user
the script will be running as.

-Larry Jones

I think football is a sport the way ducks think hunting is a sport. -- Calvin



RE: Writing shell scripts that use CVS / Automatic checkout

2000-03-14 Thread Cameron, Steve


You only need to "cvs login" one time.  After that it is not necessary,
The information is stored in ~/.cvspass

If your cron job is using different CVSROOT values for each
time it is run (seems unlikely) then you'd have to log in
of the CVSROOT values once.  (presumably there is a 
small, finite, predetermined set of CVSROOT values you'd
be using, (probably just one value)...  

Well if not, you're doing something rather strange...:-)

hope it helps
--steve


 -Original Message-
 From: Mikael Grave [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, March 14, 2000 8:18 AM
 To:   cvs-list
 Subject:  Writing shell scripts that use CVS / Automatic checkout
 
 Hello,
 
 I am currently writing a small Shell script that will log into my CVS
 respository and will issue a checkout. This script is intended to be
 called every 10mn by a crontab.
 
 Since "cvs login" does not have a command line option to pass the
 password, I was wondering if there is a simple trick to run "cvs login"
 automatically? I have tried things like:
 
 echo "x" | cvs login
 
 But it does not work (the password is not taken from the buffered stdin
 I guess).
 
 My original purpose was to perform an automatic checkout (in a test bed)
 every time someone was doing a commit. Doing this with "commitinfo" did
 not seem possible since "cvs commit" recursively commit all modified
 files, if 100 files are commited at once, I don't want commitinfo to
 launch 100 checkouts (maybe should I simply run one "update" per
 "committed" file?). So I decided to go for a crontab (not as good, user
 may have to wait 10mn to see their changes published in the test bed).
 
 Any help or trick are welcome. I guess my problem is quite common. Hope
 my questions are not too stupid :)
 
 Cordially,
 
 Mikael
 -- 
 Mikael Grave Tel. (613) 731-4046  http://www.webmotion.com
 Webmotion Inc.   Fax. (613) 260-9545[EMAIL PROTECTED]
 `'