This is an archive of the discontinued Mercurial Phabricator instance.

keepalive: Do not append _rbuf if _raw_readinto exists (issue6356)
ClosedPublic

Authored by ced on Aug 2 2020, 11:41 AM.

Details

Summary

The readline method append to the chunks the content of the _rbuf then there
is a loop that call _raw_read which on Python3 call readinto. But the readinto
version in mercurial append again the _rbuf content. So this creates the
duplicate content. This does not happen in Python2 because _raw_read does not
call readinto.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ced created this revision.Aug 2 2020, 11:41 AM
marmoute accepted this revision.Aug 6 2020, 7:25 AM
marmoute added a subscriber: marmoute.

Looks legit. Thanks.

indygreg accepted this revision.Aug 8 2020, 5:01 PM
indygreg added a subscriber: indygreg.

Good work tracking down this obscure failure!

I'm going to land this in the stable branch so it is in the next release.

This revision is now accepted and ready to land.Aug 8 2020, 5:01 PM