]> git.saurik.com Git - wxWidgets.git/blob - misc/scripts/svn/hooks/post-commit
avoid duplicate move events
[wxWidgets.git] / misc / scripts / svn / hooks / post-commit
1 #!/bin/bash
2
3 REPOS="$1"
4 REV="$2"
5 AUTHOR=`svnlook author $REPOS -r $REV`
6 REPONAME=`basename $REPOS`
7 ##URL="http://svn.wxwidgets.org/viewvc/$REPONAME?view=rev&rev=%s"
8 URL="http://trac.wxwidgets.org/changeset/%s"
9 TICKET_MAP='\[?#\s*(\d+)\]?=http://trac.wxwidgets.org/ticket/%s'
10
11 EMAIL1="wx-commits-diffs@googlegroups.com"
12 EMAIL2="wx-commits@googlegroups.com"
13 EMAIL3="wxPython-commits@googlegroups.com"
14 FROM="noreply@wxsite.net"
15 REPLYTO1="wx-dev@googlegroups.com"
16 REPLYTO2=$REPLYTO1
17 REPLYTO3="wxPython-dev@googlegroups.com"
18
19 WXPYTHON=`svnlook dirs-changed $REPOS -r $REV | grep -ce ^wxPython`
20
21 if [ $WXPYTHON = 0 ]; then
22 # Send notification with diffs
23 /usr/bin/svnnotify --repos-path "$REPOS" \
24 --revision $REV \
25 --to $EMAIL1 \
26 --from $FROM \
27 --reply-to $REPLYTO1 \
28 --subject-prefix "SVN:($AUTHOR)" \
29 --revision-url $URL \
30 --ticket-map $TICKET_MAP \
31 --wrap-log \
32 --with-diff \
33 --diff-switches '--no-diff-added --no-diff-deleted' \
34 --max-diff-length 10240 \
35 --handler Alternative \
36 --alternative HTML::ColorDiff \
37 &
38
39
40
41 # Send plain text notification without diffs to a different address
42 /usr/bin/svnnotify --repos-path "$REPOS" \
43 --revision $REV \
44 --to $EMAIL2 \
45 --from $FROM \
46 --reply-to $REPLYTO2 \
47 --subject-prefix "SVN:($AUTHOR)" \
48 --revision-url $URL \
49 &
50
51 else
52 # Send notification to the wxPython address
53 /usr/bin/svnnotify --repos-path "$REPOS" \
54 --revision $REV \
55 --to $EMAIL3 \
56 --from $FROM \
57 --reply-to $REPLYTO3 \
58 --subject-prefix "SVN:($AUTHOR)" \
59 --revision-url $URL \
60 --ticket-map $TICKET_MAP \
61 --wrap-log \
62 --with-diff \
63 --handler HTML::ColorDiff \
64 --diff-switches '--no-diff-added --no-diff-deleted' \
65 --max-diff-length 10240 \
66 &
67 fi
68
69
70 ## Send notification to cia.vc
71 #$REPOS/hooks/ciabot_svn.py "$REPOS" $REV &
72
73
74 # Check for keywords that Trac can use
75 export PYTHONPATH=/home/wxsite/domains/trac.wxwidgets.org/htdocs/lib/python
76 export PYTHON_EGG_CACHE=/tmp/.python-eggs
77 /usr/bin/python2.5 $REPOS/hooks/trac-post-commit-hook \
78 -p /home/wxsite/domains/trac.wxwidgets.org/htdocs/wxtrac -r $REV &
79
80