[Zope-CVS] CVS: CVSROOT - postcommit_actions:1.135

Ken Manheimer klm@zope.com
Tue, 11 Dec 2001 11:52:01 -0500

Update of /cvs-repository/CVSROOT
In directory cvs.zope.org:/tmp/cvs-serv12117

Modified Files:
Log Message:
Getting CVSROOT relative to the SCRIPT_DIR.

Also, some module docstring changes generated for the sake of doing
checkins when exercising the new (zopeorg) repository - turns out
they're worthwhile, worth changing this copy of postcommit_actions as
well.  Ah, the way some progress happens...-)

=== CVSROOT/postcommit_actions 1.134 => 1.135 ===
-"""Apply actions dictated by traffic_table.py to checkins as they occur.
+"""Apply actions triggered by checkins as dictated by traffic_table.py.
-Normal operation is to fork into the background with stderr and stdout
-redirected to append to the file named by the OUTPUT_LOG config var - so
-that the user doesn't have to wait for the checkin message to be collected
-and sent or for the rsync to complete.  (We can't simply fork into the
-background, because clients like emacs VC will hang waiting the close of
-sys.stdin, sys.stderr, sys.stdout, etc. - on the order of minutes.)
+Special provisions to fork into the background, disconnected from tty, so
+the user and (more critically) CVS locks don't wait pending completion of
+notification and other potentially meandering actions.
@@ -18,6 +15,7 @@
  --dryrun - do not actually do any of the activities
  --wait - do not fork into the background (and leave output in stdout/stderr)
+          This is for internal use by the script when forking.
  --msgfile MSGFILENM - internal - get log message from MSGFILENM (and delete)
@@ -55,7 +53,7 @@
 import smtplib
 import socket, whrandom, getpass
-CVSROOT = os.environ.get('CVSROOT', '/cvs-repository')
+CVSROOT = os.path.split(SCRIPT_DIR)[0]
 LDAP_PORT = 389
 OFFICIAL_SENDER = "cvs-admin@cvs.zope.org"