[Top][All Lists]

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

RE: Needs CVS email notification help !

From: Bulgrien, Kevin
Subject: RE: Needs CVS email notification help !
Date: Tue, 4 Apr 2006 10:34:57 -0500

-----Edited Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of address@hidden
Sent: Monday, April 03, 2006 7:58 PM
To: address@hidden
Subject: Needs CVS email notification help !

Regarding loginfo. We do have cvs-log in our loginfo. But this is more for
searching ^module and trigger email script for notify. That part is working
for us, but our modules has a very deep directory structure.

So my question is: how can I have a trigger email notify for a specific
directory under out main modules when our users commit a checkin.
-----Edited Original Message-----

The loginfo trigger was very hard for me to get going based on lack of
documentation (at least in the non-development RPM I use).  Also, I
am using 1.11.xx and not 1.12.xx, but the following may be helpful to
you.  For any script to work, it is going to be very important to know
the API that the loginfo caller uses.

Here is a sample working loginfo bash script.  Hopefully it may provide
some insight.  I have not included the called scripts, but this should
give at least a minimal working interface that can be modified per your
requirements.  I called subscripts so that my loginfo trigger script is
common even though different sub-functions might run per repository

# 2005/10/05
# CVSROOT loginfo should contain:
#   ALL /home/cvs/scripts/ %{sVv}
# This creates the following script parameter format:
#   module file1,oldversion,newversion file2,oldversion,newversion ...
# The script will run as the user doing the commit.


LST="${*#* }"
DIR="${*//% ${LST}/}"
D_T=$(date "+%m/%d/%y %H:%M:%S")

# Script API
# -l "log directory"
# -t "Date time"
# -d "module directory" (Could be null if top-level directory)
# ${LST} parameters are now a list of files with revision information:
#   file1,orev,rev file2,orev,rev ...
# If ${LST} begins with "-", the parameters are simply a text message.  For
# example:
#   - New Directory
# Subordinate scripts must handle exception cases where the first parameter
# is a "-".
# The following variables are defined by CVS and available for use:
#   CVSROOT   -
#   EDITOR    -
#   VISUAL    -
#   USER      - not necessarily the same as $(whoami)
# ${EXE}/ -l "${LOG}" -t "${D_T}" -d "${DIR}" ${LST}
${EXE}/ -l "${LOG}" -t "${D_T}" -d "${DIR}" ${LST}
${EXE}/ -l "${LOG}" -t "${D_T}" -d "${DIR}" ${LST}

# Consume unanticipated extra input to avoid possible errors like:
#   cvs [commit aborted]: received broken pipe signal
cat > /dev/null

reply via email to

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