[merge] Handle bad LANG
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 25 16:12:12 BST 2006
Robert Collins wrote:
> On Thu, 2006-08-24 at 16:47 -0500, John Arbash Meinel wrote:
>> Right now if you set LANG to something unrecognized by python, you get
>> an ugly traceback.
>>
>> The attached patch changes bzrlib so it falls back to just using 'ascii'
>> after emitting a semi-helpful warning.
>>
>> I'm not 100% on the english of the warning, but I think it is reasonable.
>>
>> This is probably small enough for 0.10, but I'll let Robert decide.
>>
>> My only concern is that the test might be a little too brittle, because
>> it expects a specific formatting for the locale.Error.
>
> +1 for 0.11, not for 0.10 - it assumes LANG is everywhere and I'm
> suspecting thats not fit for windows.
Well, LANG doesn't have an effect on windows, so for now I'm skipping
the test.
>
> Also, looking at the test, why doesn't run_bzr_subprocess take care of
> the LANG and BZR_PROGRESS_BAR options rather than the test doing it ?
> That would seem cleaner and more reusable to me.
>
> -Rob
Maybe BZR_PROGRESS_BAR. But I don't think it should do anything with
LANG, as it isn't something that needs to be tested often.
I suppose instead we could pass environment vars to set/unset as part of
run_bzr_subprocess.
As long as we are mentioning BZR_PROGRES_BAR, I think we have a small
bug that it isn't cleaned up as part of TestCase._cleanEnvironment.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060825/55e5e49c/attachment.pgp
More information about the bazaar
mailing list