[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trigger not working
From: |
akkisoft |
Subject: |
Trigger not working |
Date: |
12 Dec 2005 02:26:25 -0800 |
User-agent: |
G2/0.2 |
I am following the steps mentioned below to apply trigger on commit in
CVS.
Create a template file '/usr/cvssupport/tc.template'.
BugId:
The script '/usr/cvssupport/bugid.verify' is used to evaluate the log
message.
#!/bin/sh
#
# bugid.verify filename
#
# Verify that the log message contains a valid bugid
# on the first line.
#
if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
exit 0
elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
# It is okay to allow commits with 'BugId: none',
# but do not put that text into the real log message.
grep -v '^BugId:[ ]*none$' > $1.rewrite
mv $1.rewrite $1
exit 0
else
echo "No BugId found."
exit 1
fi
The 'verifymsg' file contains this line:
^tc /usr/cvssupport/bugid.verify
The 'rcsinfo' file contains this line:
^tc /usr/cvssupport/tc.template
The 'config' file contains this line:
RereadLogAfterVerify=always
Even after completing all the steps I can commit a file with no/any
message. As mentioned in the template file the message should start
with "BugId:"
Is there anything I am doing wrong?
Just FYI, I also have a trigger on my module (Project1) which sends a
mail if there is any commit.
^Project1* mail -s Checked\ In:\ %s\ User:\ $USER cvsuser
DEFAULT (echo ""; id; echo %{sVv}; date; cat) >>
$CVSROOT/CVSROOT/commitlog
These lines are added in loginfo and works fine.
Akki
- Trigger not working,
akkisoft <=