[Svnmerge] KeyError on svnmerge.py
Hernán Martínez-Foffani
hernan.martinez at ecc.es
Sun Mar 9 00:59:40 PST 2008
Later today I can try to test the error Romulo reported. Supposely it
has to do with portuguese messages.
---
Enviado desde mi iPod
El 09/03/2008, a las 1:07, Raman Gupta <rocketraman at fastmail.fm>
escribió:
> Giovanni Bajo wrote:
>> On Sat, 2008-03-08 at 11:04 -0500, Raman Gupta wrote:
>>
>>>> One question: is using LC_MESSAGES=C enough to fix the
>>>> regression? In
>>>> that case, I would assume that LC_MESSAGES would only affect
>>>> SVN's own
>>>> strings and not log messages. It would be a win-win.
>>> Good idea, but svn doesn't seem to respect LC_MESSAGES for the
>>> output
>>> of svn info:
>>>
>>> # export LC_ALL=de_DE
>>> # svn info | head -1
>>> Pfad: .
>>>
>>> # LC_MESSAGES=C svn info | head -1
>>> Pfad: .
>>>
>>> # LC_ALL=C svn info | head -1
>>> Path: .
>>
>> I see. I guess this changed in later SVN versions (given that
>> svnmerge.sh used to use LC_MESSAGES), but never mind.
>
> LC_MESSAGES is respected by svn, as long as LC_ALL is *not* set. This
> is apparently correct POSIX behavior:
>
> http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html#tag_08_02
>
> Also, Hernan has shown that svn *does* override the Windows regional
> settings with the value of LC_MESSAGES. So the Windows regional
> settings are roughly equivalent to the UNIX LANG variable.
>
> Therefore, should the attached patch solve the issue?
>
> I don't know if this will regress svnmerge.py on Romulo's problem. The
> testCommitMessageEncoding test case passes on my machine, but the test
> case is heavily dependent on the machine environment in which it is
> run. It would be helpful if Romulo could test this but I've been
> getting bounces on his email address.
>
> Cheers,
> Raman Gupta
> Index: svnmerge.py
> ===================================================================
> --- svnmerge.py (revision 29666) +++ svnmerge.py (working
> copy) @@ -94,6 +94,12 @@ # the locale to match that encoding
> locale.setlocale(locale.LC_ALL, '') +# We want the svn output (such
> as svn info) to be non-localized +# Using LC_MESSAGES should not
> affect localized output of svn log, for example +if
> os.environ.has_key("LC_ALL"): + del os.environ["LC_ALL"] +os.environ
> ["LC_MESSAGES"] = "C" +
> ###
> ###
> ###
> ###
> ###################################################################
> # Support for older Python versions
> ###
> ###
> ###
> ######################################################################
More information about the Svnmerge
mailing list