Ryan Schmidt-60 wrote:
>
> On Sep 7, 2009, at 09:49, Marc Lustig wrote:
>
>> Could somebody explain what exactly the pre-commit hook-script
>>
>> http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/syntax-check.sh
>>
>> is doing?
>
> Sadly it does not appear to be described here:
>
> http://subversion.tigris.org/tools_contrib.html
>
>
>> The comments state
>> # This script provides language independant syntax checking
>> # functionality intended to be invoked from a subversion pre-commit
>> # hook.
>>
>> What rules are used for the syntax?
>> What will be ensured if the script is passed successfully?
>
> As shipped, it looks like the script only checks the syntax of PHP
> files. I believe you are meant to modify the following variables if
> you want it to check a different language:
>
> FPATTERN="\.\(php\|phpt\)$"
> FLANG="PHP"
> SYNTAX_CMD="php"
> SYNTAX_ARGS="-l"
>
>
>> We have the requirement to ensure that log-messages as well as file-
>> names
>> and the contents of character-based files are properly encoded,
>> i .e. in
>> UTF-8.
>> Anybody knows a script to do this job?
>
> For filenames and log message, Subversion should be checking this
> already. It should not be possible for non-UTF-8 filenames or log
> messages to end up in the repository. Though I think there may be some
> cases where it can happen, for example when loading a dumpfile via
> svnadmin load? There seem to be more lax checks in place there than
> with the "svn commit" or "svn import" mechanisms.
> ...
>
We are using SVN 1.5.2 and apparrently we had trouble with log-messages,
file-names and file-contents.
problem scenario 1: svnsync rejects to operate because it cannot handle some
svn:log properties. You can fix this by editing those messages.
problem scenario 2: svnsync operates, but it creates "empty" commit's! i.
e., all of the revisions are created, but they do not have any content. (I
am not quite sure if this is related to some encoding problem, thou. It
might be a compatibility issue between different SVN-versions.)
problem scenario 3: user A commits a file; user B checks the file out and
apprently special chars are "spoiled", they are not re-encoded as they have
been encoded before.
This is my understanding of the process:
when checking in a file, Subversion recognizes the format that the fle is
encoded and saves this information somewhere. Then the file is transformed
into UTF-8 and placed in the repo.
When the file is checked out again, the file is re-encoded in the original
format.
Is that correct?
Another question: is there any requirement of Subversion regarding the
encoding of files when they are checked in?
One more: does anybody have experience using the dos2unix-tool in the
pre-commit hook?
best regards.
--
View this message in context: http://www.nabble.com/explaining-syntax-check-hook-script-tp25331704p25340854.html
Sent from the Subversion Users mailing list archive at Nabble.com.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2392258
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-08 09:06:28 CEST