diff --git a/misc/scripts/svn/hooks/post-commit b/misc/scripts/svn/hooks/post-commit deleted file mode 100755 index eedfd431b5..0000000000 --- a/misc/scripts/svn/hooks/post-commit +++ /dev/null @@ -1,79 +0,0 @@ -#!/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 & - - -# Trigger Trac syncronization, must run as Trac's user -sudo -u wxsite $REPOS/hooks/trac-post-commit.sh "$REPOS" "$REV" - - - - diff --git a/misc/scripts/svn/hooks/post-revprop-change b/misc/scripts/svn/hooks/post-revprop-change deleted file mode 100755 index 667db13b93..0000000000 --- a/misc/scripts/svn/hooks/post-revprop-change +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# POST-REVPROP-CHANGE HOOK -# -# The post-revprop-change hook is invoked after a revision property -# has been added, modified or deleted. Subversion runs this hook by -# invoking a program (script, executable, binary, etc.) named -# 'post-revprop-change' (for which this file is a template), with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REV (the revision that was tweaked) -# [3] USER (the username of the person tweaking the property) -# [4] PROPNAME (the property that was changed) -# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) -# -# [STDIN] PROPVAL ** the old property value is passed via STDIN. -# -# Because the propchange has already completed and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# new property value. -# -# On a Unix system, the normal procedure is to have 'post-revprop-change' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-revprop-change' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-revprop-change.bat' or 'post-revprop-change.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" -USER="$3" -PROPNAME="$4" -ACTION="$5" - -# Trigger Trac syncronization, must run as Trac's user -sudo -u wxsite $REPOS/hooks/trac-post-revprop-change.sh "$REPOS" "$REV" - diff --git a/misc/scripts/svn/hooks/pre-commit b/misc/scripts/svn/hooks/pre-commit deleted file mode 100755 index 73c84dbdb2..0000000000 --- a/misc/scripts/svn/hooks/pre-commit +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -REPOS="$1" -TXN="$2" - -SVNLOOK=/usr/bin/svnlook - -svnl() { - cmd=$1 - shift - $SVNLOOK $cmd "$REPOS" -t "$TXN" $* -} - -rc=0 - -# exclude all third-party files from consideration, we don't want to do any -# checks for them -# -# Also don't impose any constraints on commits to previous 2.x branches. -all_changed_files=`svnl changed | \ - grep "^[AU]" | \ - sed 's/^....//' | \ - egrep -v "branches/WX_2_" | \ - egrep -v "wxWidgets/vendor" | \ - egrep -v "src/(expat|tiff|regex|jpeg|stc/scintilla|zlib)" | \ - egrep -v "src/msw/version.rc" | \ - egrep -v "_wrap.cpp" | \ - egrep -v "wxPython/.*/docs/.*\.html$"` - -# analyze the changed files to find all non-binary and all source files -for f in $all_changed_files; do - mimetype=`svnl proplist -v $f | - fgrep "svn:mime-type" | - sed 's/^ svn:mime-type : //'` - case $mimetype in - ''|text/*) - ;; - - *) - continue - ;; - esac - - changed_text_files="$changed_text_files $f" - - case $f in - *.cpp|*.h|*.py) - changed_sources="$changed_sources $f" - ;; - esac -done - -for f in $changed_sources; do - if svnl cat $f | fgrep -q ' '; then - echo "Please remove TABs from $f before committing." >&2 - rc=1 - fi - - case $f in - */wx/chartype.h) - # This file defines _T() for compatibility so don't check it. - ;; - - */docs/doxygen/overviews/changes_since28.h) - # And this one describes changes from _T() to wxT(). - ;; - - *) - if svnl cat $f | fgrep -qw '_T'; then - echo "Please use wxT() instead of _T() in $f." >&2 - rc=1 - fi - ;; - esac -done - -for f in $changed_text_files; do - if ! svnl cat $f | iconv -f utf8 -t WCHAR_T > /dev/null; then - echo "File $f doesn't use UTF-8, please convert it before committing." >&2 - echo "(or set svn:mime-type property correctly if the file is binary)." >&2 - rc=1 - fi -done - -exit $rc - diff --git a/misc/scripts/svn/hooks/trac-post-commit.sh b/misc/scripts/svn/hooks/trac-post-commit.sh deleted file mode 100755 index 988c5977ba..0000000000 --- a/misc/scripts/svn/hooks/trac-post-commit.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -TRACHOST=/home/wxsite/domains/trac.wxwidgets.org -source $TRACHOST/.setenv -$TRACHOST/python/bin/trac-admin $TRAC_ENV changeset added "$1" "$2" - diff --git a/misc/scripts/svn/hooks/trac-post-revprop-change.sh b/misc/scripts/svn/hooks/trac-post-revprop-change.sh deleted file mode 100755 index 2835d9bc60..0000000000 --- a/misc/scripts/svn/hooks/trac-post-revprop-change.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -TRACHOST=/home/wxsite/domains/trac.wxwidgets.org -source $TRACHOST/.setenv -$TRACHOST/python/bin/trac-admin $TRAC_ENV changeset modified "$1" "$2" -