This is an archive of the discontinued Mercurial Phabricator instance.

wireproto: drop support for reader interface from streamres (API)
ClosedPublic

Authored by indygreg on Jan 15 2018, 6:20 PM.

Details

Summary

2add671bf55b and later commits overhauled support for compression
and output handling in the wire protocol.

Fast forward 14 months and all wire protocol commands except
the legacy "changegroup" and "changegroupsubset" commands feed
a generator to streamres.

I no longer think it is worth maintaining support for the old
"reader" API (which allows you to specify an object having a
read() method to obtain data).

This commit refactors the legacy wire protocol commands to feed
a generator to the streamres. We also drop support for the "reader"
argument and the code that was using it.

As part of the change, chunks over the SSH protocol have increased
in size for these commands. But these commands are really ancient,
so I doubt anyone will notice.

.. api::

wireproto.streamres.__init__ no longer accepts a "reader" argument.
Use the "gen" argument instead.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Jan 15 2018, 6:20 PM
This revision was automatically updated to reflect the committed changes.