Windows: using hg executable from an IDE results in python errors

Patrick Mézard pmezard at gmail.com
Thu Mar 20 16:53:49 CDT 2008


Alexander Belchenko a écrit :
> Patrick Mézard пишет:
>> Alexander Belchenko a écrit :
>>> I'm not Patrick but you need to test is fd hasattr fileno. When
>>> program running as
>>> subprocess then pipes fd never had fileno. Because they're not real
>>> files.
>>
>> Testing for fileno() availability cannot harm but I am not sure it
>> will solved the issue here since we get a bad file descriptor issue
>> rather than a missing attribute. I don't know how to check fileno() is
>> valid, maybe it should be positive ? Do you know an easy way to test
>> these kind of setup ?
> 
> Sorry, forgot to say about testing.
> IIRC, for testing this issue I'm launching bzr as subprocess via
> python's std lib subprocess module.
> I don't remember exactly where this test resides in our test suite though.
> I fixed this issue in December 2006, so I don't remember all details
> about testing.

Thanks for the tip, a fix is in crew.

I found your fix in bzr but cannot grep the test right now. I am a bit surprised it's reproductible with subprocess, some tests use it heavily and I never had any problems with it. Anyway, reading fileno() like that was clearly wrong.

--
Patrick Mézard



More information about the Mercurial mailing list