2000-10-18 19:03:36 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
2001-01-07 14:51:04 +01:00
|
|
|
#shift
|
2000-10-18 20:59:29 -06:00
|
|
|
FROM=$USER@mysql.com
|
2001-06-11 20:26:24 -06:00
|
|
|
INTERNALS=internals@lists.mysql.com
|
2001-11-07 01:49:38 -06:00
|
|
|
DOCS=docs-commit@mysql.com
|
2001-03-05 10:33:05 +01:00
|
|
|
LIMIT=10000
|
2004-03-25 13:29:12 +01:00
|
|
|
VERSION="4.0"
|
2000-10-18 20:59:29 -06:00
|
|
|
|
2001-04-11 19:38:02 -06:00
|
|
|
if [ "$REAL_EMAIL" = "" ]
|
|
|
|
then
|
|
|
|
echo "Warning: you must set REAL_EMAIL in your profile"
|
|
|
|
else
|
|
|
|
FROM=$REAL_EMAIL
|
|
|
|
fi
|
|
|
|
|
2001-01-14 18:40:26 +02:00
|
|
|
BK_STATUS=$BK_STATUS$BK_COMMIT
|
|
|
|
|
2001-01-07 14:51:04 +01:00
|
|
|
if [ "$BK_STATUS" = OK ]
|
2000-10-18 20:59:29 -06:00
|
|
|
then
|
2001-10-15 23:28:30 -05:00
|
|
|
|
2003-10-25 22:43:19 +02:00
|
|
|
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
|
2005-01-25 12:24:50 -08:00
|
|
|
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
|
2002-11-27 13:01:50 +01:00
|
|
|
|
2004-03-25 13:29:12 +01:00
|
|
|
if [ "$BUG" = "" ]
|
|
|
|
then
|
|
|
|
TO=dev-public@mysql.com
|
2005-01-25 12:24:50 -08:00
|
|
|
BS=""
|
|
|
|
BH=""
|
2004-03-25 13:29:12 +01:00
|
|
|
else
|
|
|
|
TO=dev-bugs@mysql.com
|
2005-01-25 12:24:50 -08:00
|
|
|
BS=" BUG#$BUG"
|
|
|
|
# need newline here
|
|
|
|
BH="X-Bug: $BUG
|
|
|
|
"
|
2004-03-25 13:29:12 +01:00
|
|
|
fi
|
2001-10-15 23:28:30 -05:00
|
|
|
#++
|
2004-03-25 13:29:12 +01:00
|
|
|
# dev-public@ / dev-bugs@
|
2001-10-15 23:28:30 -05:00
|
|
|
#--
|
2000-10-18 20:59:29 -06:00
|
|
|
echo "Commit successful, notifying developers at $TO"
|
|
|
|
(
|
|
|
|
cat <<EOF
|
2004-03-25 13:29:12 +01:00
|
|
|
List-ID: <bk.mysql-$VERSION>
|
2000-10-18 20:59:29 -06:00
|
|
|
From: $FROM
|
|
|
|
To: $TO
|
2005-01-25 12:24:50 -08:00
|
|
|
Subject: bk commit - $VERSION tree ($CHANGESET)$BS
|
|
|
|
$BH
|
2001-06-11 20:26:24 -06:00
|
|
|
EOF
|
|
|
|
bk changes -v -r+
|
|
|
|
bk cset -r+ -d
|
|
|
|
) | head -n $LIMIT | /usr/sbin/sendmail -t
|
2001-10-15 23:28:30 -05:00
|
|
|
|
|
|
|
#++
|
|
|
|
# internals@ mail
|
|
|
|
#--
|
2001-06-11 20:26:24 -06:00
|
|
|
echo "Notifying internals list at $INTERNALS"
|
|
|
|
(
|
|
|
|
cat <<EOF
|
2004-03-25 13:29:12 +01:00
|
|
|
List-ID: <bk.mysql-$VERSION>
|
2001-06-11 20:26:24 -06:00
|
|
|
From: $FROM
|
|
|
|
To: $INTERNALS
|
2005-01-25 12:24:50 -08:00
|
|
|
Subject: bk commit into $VERSION tree ($CHANGESET)$BS
|
|
|
|
$BH
|
2001-06-11 20:26:24 -06:00
|
|
|
|
2002-08-15 14:59:14 +10:00
|
|
|
Below is the list of changes that have just been committed into a local
|
2004-03-25 13:29:12 +01:00
|
|
|
$VERSION repository of $USER. When $USER does a push these changes will
|
2002-06-17 09:44:39 +10:00
|
|
|
be propagated to the main repository and, within 24 hours after the
|
|
|
|
push, to the public repository.
|
2001-06-28 19:48:49 -06:00
|
|
|
For information on how to access the public repository
|
2005-01-25 12:24:50 -08:00
|
|
|
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
|
2000-10-18 20:59:29 -06:00
|
|
|
|
|
|
|
EOF
|
|
|
|
bk changes -v -r+
|
2000-11-04 21:00:41 -07:00
|
|
|
bk cset -r+ -d
|
2001-03-05 10:33:05 +01:00
|
|
|
) | head -n $LIMIT | /usr/sbin/sendmail -t
|
2001-10-15 23:28:30 -05:00
|
|
|
|
|
|
|
#++
|
2001-11-07 01:49:38 -06:00
|
|
|
# docs-commit@ mail
|
2002-05-03 08:57:31 +10:00
|
|
|
# Picks up anything under the Docs subdirectory (relevant for docs team).
|
2001-10-15 23:28:30 -05:00
|
|
|
#--
|
2002-05-03 08:57:31 +10:00
|
|
|
bk changes -v -r+ | grep -q " Docs/"
|
2001-11-08 00:14:16 +01:00
|
|
|
if [ $? -eq 0 ]
|
2001-10-15 23:28:30 -05:00
|
|
|
then
|
|
|
|
echo "Notifying docs list at $DOCS"
|
|
|
|
(
|
|
|
|
cat <<EOF
|
2004-03-25 13:29:12 +01:00
|
|
|
List-ID: <bk.mysql-$VERSION>
|
2001-10-15 23:28:30 -05:00
|
|
|
From: $FROM
|
|
|
|
To: $DOCS
|
2005-01-25 12:24:50 -08:00
|
|
|
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
|
2001-10-15 23:28:30 -05:00
|
|
|
|
|
|
|
EOF
|
|
|
|
bk changes -v -r+
|
|
|
|
bk cset -r+ -d
|
|
|
|
) | head -n $LIMIT | /usr/sbin/sendmail -t
|
|
|
|
fi
|
|
|
|
|
2000-10-18 20:59:29 -06:00
|
|
|
else
|
2002-08-13 02:33:25 +03:00
|
|
|
echo "commit failed because '$BK_STATUS', you may need to re-clone..."
|
2000-10-18 20:59:29 -06:00
|
|
|
fi
|