summaryrefslogtreecommitdiff
path: root/BitKeeper/triggers/post-commit
blob: 619b6f88ceae0305f037f1fb532bffd309e3e5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

#shift
TO=dev-public@mysql.com
FROM=$USER@mysql.com
INTERNALS=internals@lists.mysql.com
LIMIT=10000

if [ "$REAL_EMAIL" = "" ]
then
 echo "Warning: you must set REAL_EMAIL in your profile"
else
 FROM=$REAL_EMAIL 
fi

BK_STATUS=$BK_STATUS$BK_COMMIT

if [ "$BK_STATUS" = OK ]
then 
 echo "Commit successful, notifying developers at $TO"
 (
   cat <<EOF
List-ID: <bk.mysql>
From: $FROM
To: $TO
Subject: bk commit into 3.23 tree

EOF
  bk changes -v -r+
  bk cset -r+ -d
 ) | head -n $LIMIT | /usr/sbin/sendmail -t
 echo "Notifying internals list at $INTERNALS"
 (
   cat <<EOF
List-ID: <bk.mysql>
From: $FROM
To: $INTERNALS
Subject: bk commit into 3.23 tree

Below is the list of changes that have just been pushed into main
3.23. repository. For information on how to access the repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

EOF
  bk changes -v -r+
  bk cset -r+ -d
 ) | head -n $LIMIT | /usr/sbin/sendmail -t
else
 echo "commit failed because '$BK_STATUS', sorry life is hard..." 
fi