Do you manage a distributed project?
Is communication between your developers efficient?
What's needed?
We'll get back to that in a bit
for now, let's manage code
CVSROOT
directoryrcsinfo
- template for log messages
verifymsg
- script to verify log message
loginfo
- script to run after commit
checkoutlist
- additional admin files
Let's try something
tc.template
BugId:
tc.template
BugId:
Seriously, that's all there is to it!
bugid.verify
#!/bin/sh
if head -1 < $1 | egrep "^BugId:[ ]*[0-9]+$" \
> /dev/null; then
exit 0
else
echo "No BugId found."
exit 1
fi
verifymsg
and rcsinfo
Tell verifymsg
how to check commits:
^src /usr/cvssupport/bugid.verify
Tell rcsinfo
what to prompt devs for:
^src /usr/cvssupport/tc.template
verifymsg
and rcsinfo
Tell verifymsg
how to check commits:
^src /usr/cvssupport/bugid.verify
Tell rcsinfo
what to prompt devs for:
^src /usr/cvssupport/tc.template
Maybe tell config
to reread commit message:
RereadLogAfterVerify=always
BugId: none
Add this before the else
:
elif head -1 < $1 | egrep "^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.
egrep -v "^BugId:[ ]*none$" > $1.rewrite
mv $1.rewrite $1
exit 0
Add to loginfo
:
DEFAULT $CVSROOT/CVSROOT/syncmail -u %{sVv} \
devs@foo.com
Use the syncmail
script provided in the CVS Book
%s
, %V
, %v
and %{sVv}
?%s
is the filename
%V
is the old revision number
%v
is the new revision number
Make way for Bugzilla
bugzilla.procmailrc
for some alias, eg: cvsbugz@foo.com
loginfo
file to mail log messages to this alias
Added log messages to get more data
[bug 31337 time:1 left:3]
...
Added defenestration logic
Removed redundant log messages
[fix bug 31337 time:3 left:0]
bugzilla.procmailrc
.procmailrc
file calls cvsbugz.pl
for matching mails
# Check message body for [bug XXXXXX syntax
:0 Bc
* \[(fix +)?bug +[0-9]+
|$HOME/cvsbugz.pl
cvsbugz.pl
parses the email for the [bug XXXXX]
syntax
Bugzilla::Bug
perl module
Now, we'll talk
cvsweb
has links to bugzilla entries
cvs2cl
(search for it)
cvs2cl
(search for it)
Philip S Tellis
Made with Eric A Meyer's S5