wireprotoserver: extract SSH response handling functions
ClosedPublic

Authored by indygreg on Wed, Feb 7, 11:32 PM.

Details

Summary

The lookup/dispatch table was cute. But it isn't needed. Future
refactors will benefit from the handlers for individual response
types living outside the class.

As part of this, I snuck in a change that changes a type compare
from str to bytes. This has no effect on Python 2. But it might
make Python 3 a bit happier.

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.
indygreg created this revision.Wed, Feb 7, 11:32 PM
indygreg updated this revision to Diff 5342.Thu, Feb 8, 12:20 AM
durin42 accepted this revision.Mon, Feb 12, 4:19 PM
This revision is now accepted and ready to land.Mon, Feb 12, 4:19 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Tue, Feb 13, 8:53 AM
yuja added inline comments.
mercurial/wireprotoserver.py
424

rsp.res here looks like an integer.