You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Herbert <He...@web.de> on 2012/01/18 11:59:44 UTC

commit issue

Tortoise version:
TortoiseSVN 1.7.4, Build 22459 - 64 Bit , 2012/01/13 12:57:07
Subversion 1.7.2,
apr 1.4.5
apr-utils 1.3.12
neon 0.29.6
OpenSSL 1.0.0e 6 Sep 2011
zlib 1.2.5


Issue:
Commit dialogue will fail on description messages containing quotes like 
"..."

Problem is probably related to the command line:
svn commit -m "..."..."" - will fail

Error displayed (translated):
Pre-Commit blocking with exit-code 255.
"""="*" can not be processed



Re: commit issue

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 18, 2012, at 04:59, Herbert wrote:

> Tortoise version:
> TortoiseSVN 1.7.4, Build 22459 - 64 Bit , 2012/01/13 12:57:07
> Subversion 1.7.2,
> apr 1.4.5
> apr-utils 1.3.12
> neon 0.29.6
> OpenSSL 1.0.0e 6 Sep 2011
> zlib 1.2.5
> 
> 
> Issue:
> Commit dialogue will fail on description messages containing quotes like "..."
> 
> Problem is probably related to the command line:
> svn commit -m "..."..."" - will fail
> 
> Error displayed (translated):
> Pre-Commit blocking with exit-code 255.
> """="*" can not be processed

If you're saying that typing a quotation mark into the TortoiseSVN commit dialog produces this error, then that's a TortoiseSVN issue that should be reported to their mailing list, not here.

Certainly running that command on the command line will not work because the quotes are not escaped according to shell escaping rules.




Re: commit issue

Posted by OBones <ob...@free.fr>.
Andy Levy wrote:
> My own pre-commit hook has the same flaw. I just haven't gotten around 
> to fixing it because I have few enough users that it's easier to just 
> tell them "don't do that" - and I haven't been given the time to redo 
> my hooks in a better language. 
If that helps, you can strip "forbidden" characters like that:

set LOGMSG=%LOGMSG:>=_%
set LOGMSG=%LOGMSG:'=_%
set LOGMSG=%LOGMSG:"=_%


but the LOGMSG variable must not be empty for it to work. So if you 
extract the log message from the transaction, be sure to always put at 
least one character into LOGMSG and adjust your length checks accordingly.
A full example is here:

http://svnwintools.tigris.org/source/browse/*checkout*/svnwintools/trunk/sources/SVNHookScripts/check-empty-log.bat?revision=HEAD&content-type=text%2Fplain

Re: commit issue

Posted by Andy Levy <an...@gmail.com>.
On Wed, Jan 18, 2012 at 06:24, Ryan Schmidt
<su...@ryandesign.com> wrote:
> On Jan 18, 2012, at 05:22, Stephen Butler wrote:
>
>> On Jan 18, 2012, at 11:59 , Herbert wrote:
>>
>>> Error displayed (translated):
>>> Pre-Commit blocking with exit-code 255.
>>> """="*" can not be processed
>>
>> This is an error message from a pre-commit hook script installed by
>> your Subversion administrator.  It's not a Subversion (or TortoiseSVN)
>> bug.  FWIW, TortoiseSVN calls the Subversion API directly, so no shell
>> escaping is involved on the client side.
>>
>> Ask your administrator why he or she chose to forbid quotes in the
>> commit messages.
>
> Ah, right. I'm guessing the administrator did not intend to prevent commit messages with quotation marks, merely that the administrator never tested that scenario and is not escaping things properly in their script.
>
>

The latter is the most likely scenario. Escaping characters in DOS
batch files isn't as obvious as it is in sane programming
environments. My own pre-commit hook has the same flaw. I just haven't
gotten around to fixing it because I have few enough users that it's
easier to just tell them "don't do that" - and I haven't been given
the time to redo my hooks in a better language.

Re: commit issue

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 18, 2012, at 05:22, Stephen Butler wrote:

> On Jan 18, 2012, at 11:59 , Herbert wrote:
> 
>> Error displayed (translated):
>> Pre-Commit blocking with exit-code 255.
>> """="*" can not be processed
> 
> This is an error message from a pre-commit hook script installed by 
> your Subversion administrator.  It's not a Subversion (or TortoiseSVN)
> bug.  FWIW, TortoiseSVN calls the Subversion API directly, so no shell 
> escaping is involved on the client side.
> 
> Ask your administrator why he or she chose to forbid quotes in the
> commit messages.

Ah, right. I'm guessing the administrator did not intend to prevent commit messages with quotation marks, merely that the administrator never tested that scenario and is not escaping things properly in their script.



Re: commit issue

Posted by Stephen Butler <sb...@elego.de>.
On Jan 18, 2012, at 11:59 , Herbert wrote:

> Tortoise version:
> TortoiseSVN 1.7.4, Build 22459 - 64 Bit , 2012/01/13 12:57:07
> Subversion 1.7.2,
> apr 1.4.5
> apr-utils 1.3.12
> neon 0.29.6
> OpenSSL 1.0.0e 6 Sep 2011
> zlib 1.2.5
> 
> 
> Issue:
> Commit dialogue will fail on description messages containing quotes like "..."
> 
> Problem is probably related to the command line:
> svn commit -m "..."..."" - will fail
> 
> Error displayed (translated):
> Pre-Commit blocking with exit-code 255.
> """="*" can not be processed

This is an error message from a pre-commit hook script installed by 
your Subversion administrator.  It's not a Subversion (or TortoiseSVN)
bug.  FWIW, TortoiseSVN calls the Subversion API directly, so no shell 
escaping is involved on the client side.

Ask your administrator why he or she chose to forbid quotes in the
commit messages.

Regards,
Steve