You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fernando Garcia <fe...@uol.com.br> on 2006/07/06 14:52:34 UTC
Simple pre-commit hook didn't work
Dears
I can't get working a simple hook scripts.
I've chechek paths, docs, list, etc and it didn't work yet.
Since I'm a new user, what am I mistaking ?
I used the pre-commit example that comes with subversion and It doesn't
work.
========begin pre-commit=============
SVNLOOK=/usr/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep "[a-zA-Z0-9]" > /dev/null || exit 1
# All checks passed, so allow the commit.
exit 0
========end pre-commit=============
svnuser@host1:/tmp/repo1$ svn commit -m "test"
Área de autenticação: <svn://localhost:3690> TESTE Repository
Senha para 'svnuser':
Enviando etc/named.conf
Transmitindo dados do arquivo .svn: Commit falhou (detalhes a seguir):
svn: Hook 'pre-commit' falhou com saída de erro:
svnuser@host1:/tmp/zwicki$
I did another test, with just a simple line in the script:
/bin/echo "TEST"
exit 0
And it didn't work as well.
If I remove the script, I can commit successfully .
I'm using subversion over Ubuntu 6.06.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Simple pre-commit hook didn't work
Posted by Marc Haisenko <ha...@comdasys.com>.
On Thursday 06 July 2006 16:52, Fernando Garcia wrote:
> ========begin pre-commit=============
> SVNLOOK=/usr/bin/svnlook
> $SVNLOOK log -t "$TXN" "$REPOS" | \
> grep "[a-zA-Z0-9]" > /dev/null || exit 1
> # All checks passed, so allow the commit.
> exit 0
> ========end pre-commit=============
You specifiy the full path to grep, since $PATH is not set in hooks.
C'ya,
Marc
--
Marc Haisenko
Comdasys AG
Rüdesheimer Straße 7
D-80686 München
Tel: +49 (0)89 - 548 43 33 0
Fax: +49 (0)89 - 548 43 33 29
e-mail: haisenko@comdasys.com
http://www.comdasys.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org