cvs usage question
I;m trying to update the source tree on a 3.7 machine to current I did the following (based upon my reading of the web site docs on this): cd /usr/src setenv [EMAIL PROTECTED]:/cvs cvs -q get -P src But all I got were these error messages: cvs server: cannot find module `src' - ignored cvs [checkout aborted]: cannot expand modules What am I doing wrong? -- U.S. Encouraged by Vietnam Vote - Officials Cite 83% Turnout Despite Vietcong Terror - New York Times 9/3/1967
cvs usage question
I just started using cvs to manage a new web project had a usage question I was wondering if anyone could help me with. Once I run "cvs commit" in my local repos I would like the server to automatically run a "cvs update" on a checkout which is located on the same server as the cvs repos. I was wondering if this was possible and how you might go out doing it. Thanks.
Re: cvs usage question
stan napisaE(a): I;m trying to update the source tree on a 3.7 machine to current I did the following (based upon my reading of the web site docs on this): cd /usr/src setenv [EMAIL PROTECTED]:/cvs cvs -q get -P src But all I got were these error messages: cvs server: cannot find module `src' - ignored cvs [checkout aborted]: cannot expand modules What am I doing wrong? I'm not sure.. but shouldn't you be doing this from the /usr directory, and not /usr/src..? -- Przemyslaw Nowaczyk <[EMAIL PROTECTED]> CS student @ Poznan University of Technology
Re: cvs usage question
On Mon, Oct 17, 2005 at 09:49:21AM -0400, stan wrote: > I;m trying to update the source tree on a 3.7 machine to current I did the > following (based upon my reading of the web site docs on this): > > cd /usr/src > setenv [EMAIL PROTECTED]:/cvs > cvs -q get -P src > > But all I got were these error messages: > > cvs server: cannot find module `src' - ignored > cvs [checkout aborted]: cannot expand modules > > > What am I doing wrong? you don't need the equation sign: setenv CVSROOT [EMAIL PROTECTED]:/cvs or you need to use export if you use ksh. use 'echo $CVSROOT' to see if this variable is set correctly. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
Re: cvs usage question
This what I use. cd /usr cvs -d [EMAIL PROTECTED]:/cvs -q up -rOPENBSD_3_7 -P src On 10/17/05, steven mestdagh <[EMAIL PROTECTED]> wrote: > On Mon, Oct 17, 2005 at 09:49:21AM -0400, stan wrote: > > I;m trying to update the source tree on a 3.7 machine to current I did the > > following (based upon my reading of the web site docs on this): > > > > cd /usr/src > > setenv [EMAIL PROTECTED]:/cvs > > cvs -q get -P src > > > > But all I got were these error messages: > > > > cvs server: cannot find module `src' - ignored > > cvs [checkout aborted]: cannot expand modules > > > > > > What am I doing wrong? > > you don't need the equation sign: > setenv CVSROOT [EMAIL PROTECTED]:/cvs > > or you need to use export if you use ksh. > use 'echo $CVSROOT' to see if this variable is set correctly. > > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm > > -- Thanks & Regards, Ikmal aka EvoIVGSR http://www.leakage.org/ http://root.justdied.com/mylife/ http://www.openbsd.org.my/ http://mirrors.mybsd.org.my/
Re: cvs usage question
James, I do roughly the same thing with a few of my websites, with one exception, I have a cron job that runs every hour to update the sites. This is not instantaneous but it works well enough for my sites. While you can adjust the timing to every five mins if you need it that quickly (as there would not be any bandwidth usage just disk IO) I found that this way results in way to much email confirming the updates during the times that I am not developing (while I am at work, or in bed for instance) and coming home to several hundred CVS update messages tends to get annoying, let alone makes my inbox a lot larger then I really want to deal with in a short amount of time. Hope this helps. Michael Osburn On Dec 16, 2006, at 8:11 PM, James Turner wrote: I just started using cvs to manage a new web project had a usage question I was wondering if anyone could help me with. Once I run "cvs commit" in my local repos I would like the server to automatically run a "cvs update" on a checkout which is located on the same server as the cvs repos. I was wondering if this was possible and how you might go out doing it. Thanks.
Re: cvs usage question
Thanks for the recommendation, your the second person to suggest cron. jcs@ suggested looking at loginfo in CVSROOT, but I haven't had much luck there. I added "^webapp cd /var/www/webapp && cvs update -d" but there seems to be a locking issue, I'm guessing cvs update tries to run before the commit is finished, which it won't allow. On Sat, 16 Dec 2006, Michael Osburn wrote: James, I do roughly the same thing with a few of my websites, with one exception, I have a cron job that runs every hour to update the sites. This is not instantaneous but it works well enough for my sites. While you can adjust the timing to every five mins if you need it that quickly (as there would not be any bandwidth usage just disk IO) I found that this way results in way to much email confirming the updates during the times that I am not developing (while I am at work, or in bed for instance) and coming home to several hundred CVS update messages tends to get annoying, let alone makes my inbox a lot larger then I really want to deal with in a short amount of time. Hope this helps. Michael Osburn On Dec 16, 2006, at 8:11 PM, James Turner wrote: I just started using cvs to manage a new web project had a usage question I was wondering if anyone could help me with. Once I run "cvs commit" in my local repos I would like the server to automatically run a "cvs update" on a checkout which is located on the same server as the cvs repos. I was wondering if this was possible and how you might go out doing it. Thanks.
Re: cvs usage question
James Turner wrote on Sat, Dec 16, 2006 at 11:28:43PM -0500: > jcs@ suggested looking at loginfo in CVSROOT, but I haven't had much luck > there. I added "^webapp cd /var/www/webapp && cvs update -d" but there > seems to be a locking issue, I'm guessing cvs update tries to run before > the commit is finished, which it won't allow. Are you sure? `info cvs` says on page "C.3 The commit support files": :: `loginfo' :: The specified program is called when the commit is complete. /usr/bin/cvs is neither suid nor sgid. Did the user typing `cvs commit` have write permission below /var/www/webapp? If write permission below /var/www/webapp is indeed the issue biting you, the simple solution is putting /var/www/webapp into the same group the repository belongs to - the committing users need write access to the repository anyway, so additional write access to the web tree will cause little additional harm.
Re: cvs usage question
Below is the output of running cvs commit on my local repos. As you can see the update tries to run on the server side but when it gets to the directory where I edited a file it has a lock error. I'm guessing it's locked for the commit there for the update won't run on it. Checking in header.tpl; /home/james/cvsroot/webapp/smarty/templates/header.tpl,v <-- header.tpl new revision: 1.4; previous revision: 1.3 done cvs update: Updating . cvs update: Updating htdocs cvs update: Updating htdocs/css cvs update: Updating htdocs/images cvs update: Updating includes cvs update: Updating smarty cvs update: Updating smarty/cache cvs update: Updating smarty/configs cvs update: Updating smarty/templates cvs update: [00:09:51] waiting for james's lock in /home/james/cvsroot/webapp/smarty/templates On Sun, 17 Dec 2006, Ingo Schwarze wrote: James Turner wrote on Sat, Dec 16, 2006 at 11:28:43PM -0500: jcs@ suggested looking at loginfo in CVSROOT, but I haven't had much luck there. I added "^webapp cd /var/www/webapp && cvs update -d" but there seems to be a locking issue, I'm guessing cvs update tries to run before the commit is finished, which it won't allow. Are you sure? `info cvs` says on page "C.3 The commit support files": :: `loginfo' :: The specified program is called when the commit is complete. /usr/bin/cvs is neither suid nor sgid. Did the user typing `cvs commit` have write permission below /var/www/webapp? If write permission below /var/www/webapp is indeed the issue biting you, the simple solution is putting /var/www/webapp into the same group the repository belongs to - the committing users need write access to the repository anyway, so additional write access to the web tree will cause little additional harm.
Re: cvs usage question
I should probably have noted this earlier, but I use cvs through ssh. So I wonder if that might be the cause of the locking issue. export CVS_RSH="ssh" export CVSROOT=":ext:[EMAIL PROTECTED]:/home/username/cvsroot"
Re: cvs usage question
I fixed the problem. It had nothing to do with using cvs through ssh. The key was running the cvs update in the background. So adding "^webapp ( cd /var/www/webapp; cvs -q update -d & )" to loginfo in my CVSROOT works perfectly with out any locking problems. On Sun, 17 Dec 2006, James Turner wrote: I should probably have noted this earlier, but I use cvs through ssh. So I wonder if that might be the cause of the locking issue. export CVS_RSH="ssh" export CVSROOT=":ext:[EMAIL PROTECTED]:/home/username/cvsroot"
Re: cvs usage question
James Turner wrote on Sun, Dec 17, 2006 at 12:13:07AM -0500: > On Sun, 17 Dec 2006, Ingo Schwarze wrote: >> James Turner wrote on Sat, Dec 16, 2006 at 11:28:43PM -0500: >>> jcs@ suggested looking at loginfo in CVSROOT, but I haven't had much luck >>> there. I added "^webapp cd /var/www/webapp && cvs update -d" but there >>> seems to be a locking issue, I'm guessing cvs update tries to run before >>> the commit is finished, which it won't allow. >> >> Are you sure? `info cvs` says on page "C.3 The commit support files": >> >> :: `loginfo' >> :: The specified program is called when the commit is complete. > Below is the output of running cvs commit on my local repos. Thanks, that output was useful. Indeed, you are right. After the command `cvs commit`, cvs(1) does not remove the lock until the commands run from CVSROOT/loginfo return. I was misled by not reading the info page word by word: The specified program is indeed called when the commit is complete, but that does not imply that the lock has already been removed, as some testing just revealed to me. Thus, i suggest to try "^webapp (cd /var/www/webapp && cvs update -dP) &" in CVSROOT/loginfo. In my test scenario, a similar line produced output like this: [EMAIL PROTECTED] $ cvs commit cvs commit: Examining . Checking in testfile; /data/test-cvs/CVSROOT/testfile,v <-- testfile new revision: 1.2; previous revision: 1.1 done cvs commit: Rebuilding administrative file database cvs update: Updating . cvs update: [07:04:18] waiting for schwarze's lock in /data/test-cvs/CVSROOT [EMAIL PROTECTED] $ # half a minute later you will see: cvs update: [07:04:48] obtained lock in /data/test-cvs/CVSROOT U testfile The point is to make loginfo start the update in a subshell and put it into the background, then return such that cvs can remove the lock. Even if the first try of cvs update is still hindered by the lock, the asynchronous job will retry 30 seconds later, and eventually, the update will succeed. You might even consider to add some shorter sleep(1) between the cd and the cvs update in the subshell, if you like. But that is not even required. The -P flag in my suggestion has nothing to do with the locking issue, but pruning empty directories seems useful to me in most cases. > I should probably have noted this earlier, but I use cvs through ssh. That's fine. I don't think ssh will cause any additional trouble here. Good luck, Ingo