Mercurial > evolve
changeset 3148:0ed75e700ad8
compat: drop compatibility for 'streamres' prior to 4.1
We no longer support these version.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 24 Oct 2017 14:30:48 +0200 |
parents | 20a0792c1773 |
children | 79a926b557f1 |
files | hgext3rd/evolve/obsexchange.py |
diffstat | 1 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obsexchange.py Tue Oct 24 14:24:29 2017 +0200 +++ b/hgext3rd/evolve/obsexchange.py Tue Oct 24 14:30:48 2017 +0200 @@ -182,17 +182,6 @@ obsdata.seek(0) return obsdata -# The wireproto.streamres API changed, handling chunking and compression -# directly. Handle either case. -if util.safehasattr(wireproto.abstractserverproto, 'groupchunks'): - # We need to handle chunking and compression directly - def streamres(d, proto): - return wireproto.streamres(proto.groupchunks(d)) -else: - # Leave chunking and compression to streamres - def streamres(d, proto): - return wireproto.streamres(reader=d, v1compressible=True) - def srv_pullobsmarkers(repo, proto, others): """serves a binary stream of markers. @@ -209,7 +198,7 @@ finaldata.write('%20i' % len(obsdata)) finaldata.write(obsdata) finaldata.seek(0) - return streamres(finaldata, proto) + return wireproto.streamres(reader=finaldata, v1compressible=True) ############################################### ### Support for old legacy exchange methods ###