( )⚙ D12555 procutil: avoid `+= None` when writing to full std{err,out} descriptor on py3

This is an archive of the discontinued Mercurial Phabricator instance.

procutil: avoid `+= None` when writing to full std{err,out} descriptor on py3
AcceptedPublic

Authored by mharbison72 on Wed, Apr 13, 6:48 PM.

Details

Reviewers
Alphare
Group Reviewers
hg-reviewers
Summary

The write function returns None if there was no room to write the given
data[1]. I don't like that this is effectively an infinite loop if there's
never any progress emptying the underlying buffer, but we're no worse off than
before, and it fixes random stacktrace popups seen in the py3 build of
TortoiseHg.

[1] https://docs.python.org/3/library/io.html#io.RawIOBase.write

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage