You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <e....@gmx.net> on 2004/05/04 20:48:16 UTC
Re: svn commit: r9622 - trunk/subversion/po
Karl,
The po files are now ready for the UTF-8 pre-commit hook. (sv.po was done in
r9620.)
bye,
Erik.
> Author: dionisos
> Date: Tue May 4 15:25:39 2004
> New Revision: 9622
>
> Modified:
> trunk/subversion/po/es.po
> Log:
> Update es.po according to TRANSLATING.
>
> * subversion/po/es.po:
> Change encoding to UTF-8.
> Update using recommendations from TRANSLATING.
>
--
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgeb�hr: http://www.gmx.net/dsl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r9622 - trunk/subversion/po
Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> 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
Thanks! And now that I've posted the old code to a public list, I
think I'll, uh... make this change right now. AHem.
> Yup. Although I'd do something similar as before:
>
> /mysterious/super/secret/path/to/verify-po.py ${REPOS} ${TXN} || exit 1
Cleaner idiom anyway.
> >By the way, is there any reason not to put "#!/usr/bin/env python" at
> >the top of verify-po.py?
>
> None at all.
Then consider it done :-).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r9622 - trunk/subversion/po
Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:
>Branko Čibej <br...@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
Re: svn commit: r9622 - trunk/subversion/po
Posted by kf...@collab.net.
Branko Čibej <br...@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?
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
# Check that .po files are in UTF-8 encoding.
if ! /mysterious/super/secret/path/to/verify-po.py ${REPOS} ${TXN}; then
exit 1
fi
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?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r9622 - trunk/subversion/po
Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:
>"Erik Huelsmann" <e....@gmx.net> writes:
>
>
>>The po files are now ready for the UTF-8 pre-commit hook. (sv.po was done in
>>r9620.)
>>
>>
>
>Thanks.
>
>Brane, I tried the hook, but it doesn't seem to block commits of
>non-UTF-8 data to files ending in ".po".
>
>Specifically, I installed the script in hooks/pre-commit of a test
>repository on svn.collab.net:
>
> REPOS="$1"
> TXN="$2"
>
> /usr/www/hook-scripts/verify-po.py ${REPOS} ${TXN}
>
> # All checks passed, so allow the commit.
> exit 0
>
>
Big surprise here, you're ignoring the exit code from verify-po.py...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r9622 - trunk/subversion/po
Posted by kf...@collab.net.
"Erik Huelsmann" <e....@gmx.net> writes:
> The po files are now ready for the UTF-8 pre-commit hook. (sv.po was done in
> r9620.)
Thanks.
Brane, I tried the hook, but it doesn't seem to block commits of
non-UTF-8 data to files ending in ".po".
Specifically, I installed the script in hooks/pre-commit of a test
repository on svn.collab.net:
REPOS="$1"
TXN="$2"
/usr/www/hook-scripts/verify-po.py ${REPOS} ${TXN}
# All checks passed, so allow the commit.
exit 0
Then I checkout out the empty repos, added some files, some of whom
ended in .po and some which didn't.
One, named "try.po", was actually a copy of /bin/ls. I assume /bin/ls
would not pass the is-utf8 test (?). I added a space to the front of
the file, and committed, and the commit succeeded.
As far as I know, we must have Python bindings on svn.collab.net,
because we use mailer.py.
Do you need more data than this?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org