File: post-commit

package info (click to toggle)
wxwidgets3.0 3.0.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 120,464 kB
  • sloc: cpp: 896,633; makefile: 52,303; ansic: 21,971; sh: 5,713; python: 2,940; xml: 1,534; perl: 264; javascript: 33
file content (80 lines) | stat: -rwxr-xr-x 2,265 bytes parent folder | download | duplicates (7)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash

REPOS="$1"
REV="$2"
AUTHOR=`svnlook author $REPOS -r $REV`
REPONAME=`basename $REPOS`
##URL="http://svn.wxwidgets.org/viewvc/$REPONAME?view=rev&rev=%s"
URL="http://trac.wxwidgets.org/changeset/%s"
TICKET_MAP='\[?#\s*(\d+)\]?=http://trac.wxwidgets.org/ticket/%s'

EMAIL1="wx-commits-diffs@googlegroups.com"
EMAIL2="wx-commits@googlegroups.com"
EMAIL3="wxPython-commits@googlegroups.com"
FROM="noreply@wxsite.net"
REPLYTO1="wx-dev@googlegroups.com"
REPLYTO2=$REPLYTO1
REPLYTO3="wxPython-dev@googlegroups.com"

WXPYTHON=`svnlook dirs-changed $REPOS -r $REV | grep -ce ^wxPython`

if [ $WXPYTHON = 0 ]; then 
     # Send notification with diffs
     /usr/bin/svnnotify --repos-path "$REPOS" \
		    --revision $REV \
		    --to $EMAIL1 \
		    --from $FROM \
		    --reply-to $REPLYTO1 \
		    --subject-prefix "SVN:($AUTHOR)" \
		    --revision-url $URL \
		    --ticket-map $TICKET_MAP \
		    --wrap-log \
		    --with-diff \
		    --diff-switches '--no-diff-added --no-diff-deleted' \
		    --max-diff-length 10240 \
		    --handler Alternative \
		    --alternative HTML::ColorDiff \
		    &
		    
		    
		   
    # Send plain text notification without diffs to a different address
    /usr/bin/svnnotify --repos-path "$REPOS" \
		   --revision $REV \
		   --to $EMAIL2 \
		   --from $FROM \
		   --reply-to $REPLYTO2 \
		   --subject-prefix "SVN:($AUTHOR)" \
		   --revision-url $URL \
		   &
		   
else
    # Send notification to the wxPython address		   
     /usr/bin/svnnotify --repos-path "$REPOS" \
		    --revision $REV \
		    --to $EMAIL3 \
		    --from $FROM \
		    --reply-to $REPLYTO3 \
		    --subject-prefix "SVN:($AUTHOR)" \
		    --revision-url $URL \
		    --ticket-map $TICKET_MAP \
		    --wrap-log \
		    --with-diff \
		    --handler HTML::ColorDiff \
		    --diff-switches '--no-diff-added --no-diff-deleted' \
		    --max-diff-length 10240 \
		    &
fi


## Send notification to cia.vc  
#$REPOS/hooks/ciabot_svn.py "$REPOS" $REV &


# Check for keywords that Trac can use
export PYTHONPATH=/home/wxsite/domains/trac.wxwidgets.org/htdocs/lib/python
export PYTHON_EGG_CACHE=/tmp/.python-eggs
/usr/bin/python2.5 $REPOS/hooks/trac-post-commit-hook \
       -p /home/wxsite/domains/trac.wxwidgets.org/htdocs/wxtrac -r $REV &