[MERGE] Don't ask a password if there is no real terminal. (#69851)
Alexander Belchenko
bialix at ukr.net
Wed Mar 12 04:29:19 GMT 2008
James Westby пишет:
> On Wed, 2008-03-12 at 00:23 +0200, Alexander Belchenko wrote:
>> This patch try to partially address of problem of using native bzr.exe on Cygwin.
>> Often it's used with non-standard terminals, and when operation with sftp or bzr+ssh
>> transport is invoked it seems like bzr.exe hang. Actually it's not hang, but try
>> to ask a password. And because in this case there is no real windows stdin, bzr
>> will wait infinitely without any sign.
>>
>> I'm also able to reproduce this behavior when I run bzr from inside FTE editor
>> as subprocess. In this case I'm also able to get the same pseudo-hang.
>>
>> Explicit check for sys.stdin.isatty() prevents of routing bzr to dead-end.
>
> Hi Alexander,
>
> The change seems pretty sensible to me.
>
> My instinct is to ask for a test. Could one be made by temporarily
> redirecting stdin from a tempfile?
>
> I don't really know what a test for this should be, and I realise
> that somethings could have the potential to cause havoc with the rest
> of the test suite.
I'm thinking about testing, but I fear such test could hang selftest waiting
for user infinitely (as it doing now). Theoretically I could launch
it as subprocess and kill subprocess after 5-10 seconds if it hangs, but
unfortunately os.kill absent on Windows.
More information about the bazaar
mailing list