[MERGE] run_bzr_suprocess avoids preexec_fn

John Arbash Meinel john at arbash-meinel.com
Wed Sep 6 13:37:28 BST 2006


Alexander Belchenko wrote:
> John Arbash Meinel пишет:
>> Alexander Belchenko wrote:
>>> Alexander Belchenko пишет:
>>>> Here is result of running selftest on win32 with fresh bzr.dev
>>>> revno.1982
>>>>
>>>> Ran 3329 tests in 1727.695s
>>>>
>>>> FAILED (failures=33, errors=41)
>>
>> ...
>>
>> Attached is a bundle which does 2 things:
>>
>> 1) adds a function to osutils which handles all of the set/unset logic.
>> I've implemented this logic several times, and it seems better to just
>> have a helper function. (Plus, the helper function handles unicode
>> strings)
>>
>> 2) Changes run_bzr_subprocess() to use a try/finally to set and clear
>> the environment, rather than using preexec_fn. I think preexec_fn is
>> really a much better an cleaner solution, but if it doesn't work on
>> win32, then we should avoid using it, rather than special casing the
>> code path based on platform.
>>
>> Alexander: does this get those tests to not fail for you?
> 
> Unfortunately your bundle incomplete. I cannot simply merge it into
> bzr.dev. After applying your bundle as patch I anyway got the same error
> about preexec_fn and tests fails.
> 

The bundle is incomplete because it was based on my earlier
run_subprocess fixes (to handle when the env var is None). However,
these have now been merged into bzr.dev, and you can try again.

I'm assuming the patch didn't apply at all, because I completely removed
preexec_fn. Probably the patch got rejected because I was changing the
same area relative to bzr.dev.

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/20060906/365848f4/attachment.pgp 


More information about the bazaar mailing list