[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r9622 - trunk/subversion/po

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-05-07 14:09:46 CEST

kfogel@collab.net wrote:

>Branko Čibej <brane@xbc.nu> writes:
>
>
>>Big surprise here, you're ignoring the exit code from verify-po.py...
>>
>>
>
>Sorry -- I assumed that when a subcommand (subprocess) exited with
>non-success, the script would too. On reflection, I don't know why I
>thought that. Too much 'make', maybe?
>
>
I guess. Or not enough "set -e". :-)

>It works now, the new hook script looks like this:
>
> #!/bin/sh
>
> LANG=en_US; export LANG
>
> REPOS=${1}
> TXN=${2}
>
> LOG=`/usr/local/bin/svnlook log ${REPOS} -t ${TXN}`
> echo "${LOG}" | grep "[a-zA-Z0-9]" > /dev/null || exit 1
>
>
You're trying to forbid empty log messages here, yes? I'd suggest not
opening an attack path by letting echo expand shell-metas in the $LOG
variable; so,

    /usr/local/bin/svnlook log ${REPOS} -t ${TXN} | \
        grep '[a-zA-Z0-9]' > /dev/null || exit 1

> # Check that .po files are in UTF-8 encoding.
> if ! /mysterious/super/secret/path/to/verify-po.py ${REPOS} ${TXN}; then
> exit 1
> fi
>
>
Yup. Although I'd do something similar as before:

    /mysterious/super/secret/path/to/verify-po.py ${REPOS} ${TXN} || exit 1

>
> exit 0
>
>Thanks for the quick diagnosis.
>
>By the way, is there any reason not to put "#!/usr/bin/env python" at
>the top of verify-po.py?
>
>
None at all.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 7 14:11:59 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.