Post-commit not working in Trac 1.6 with svn 1.14

16 views
Skip to first unread message

Jesus Megia

unread,
Apr 11, 2024, 4:52:37 AMApr 11
to Trac Users
Hello,

I have tried a lot of thinks to make post-commit work, but it doesn't work at all. In my server I downloaded trac-svn-hook and in my post-commit hook I have:

SVNLOOK=/usr/bin/svnlook

REPOS="$1"
REV="$2"
#LOG=`$SVNLOOK log -r "$REV" "$REPOS"`
#AUTHOR=`$SVNLOOK author -r "$REV" "$REPOS"`
#DIRS="`$SVNLOOK dirs-changed -r "$REV" "$REPOS"`"
TRAC_ENV="/Datos/srv/trac/Test/"

/usr/bin/python /usr/local/bin/trac-svn-hook "$REPOS"  "$REV"



The problem is that when I make a commit I receive following message
Enviando       kk.txt
Transmitiendo contenido de archivos .done
Committing transaction...
Commit de la revisión 21.

Aviso: post-commit hook failed (exit code 1) with output:
 File "/usr/local/bin/trac-svn-hook", line 181
   export TRAC_ENV
          ^^^^^^^^
SyntaxError: invalid syntax

Any idea about what am I doing wrong?

thanks in advance.

Best regards,

Jesús.

Jun Omae

unread,
Apr 11, 2024, 5:27:55 AMApr 11
to trac-...@googlegroups.com
Your /usr/local/bin/trac-svn-hook file should be executed using
/bin/sh rather than /usr/bin/python.
> --
> You received this message because you are subscribed to the Google Groups "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/5d45a9c7-93e9-4f13-a757-7cb05c87c5cdn%40googlegroups.com.



--
Jun Omae <jun...@gmail.com> (大前 潤)

Jesus Megia

unread,
Apr 11, 2024, 6:13:59 AMApr 11
to trac-...@googlegroups.com
Thanks a lot Jun for your help. Now it is working fine. It was one of these things hard to see without external help.

Best regards and have a nice day.

Jesús

Reply all
Reply to author
Forward
0 new messages