Commits

Leho Kraav committed 7623ff0

custom svn hook for various repo/env naming situations

Comments (0)

Files changed (1)

trac-svn-hook-r9872.patch

+Index: trac-svn-hook
+===================================================================
+--- a/contrib/trac-svn-hook	(revision 9872)
++++ b/contrib/trac-svn-hook	(working copy)
+@@ -140,8 +140,14 @@
+ # We also want to notify two Trac instances:
+ #
+ # {{{
+-# export TRAC_ENV=/srv/trac/the_trac_env:/srv/trac/trac_other_trac_env
+-# export PATH=/packages/trac/branches/trac-multirepos/bin:$PATH
++# leho 03.02.2010
++# We have a scenario where different repos need to sync different envs.
++# How about we set TRAC_ENV manually in post_commit when we need to
++# sync a special env, end let the rest be handled with basename as default.
++if [[ -z "$TRAC_ENV" && -n "$1" ]]; then
++	export TRAC_ENV=/secure/trac/projekt/`basename $1`
++fi
++export PATH=/secure/trac/0.12-2.6/bin:$PATH
+ # export LD_LIBRARY_PATH=/opt/python-2.4.4/lib:/opt/sqlite-3.3.8/lib:$LD_LIBRARY_PATH
+ # }}}
+ #