This is an archive of the discontinued Mercurial Phabricator instance.

wireprotoserver: extract SSH response handling functions
ClosedPublic

Authored by indygreg on Feb 7 2018, 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.

Event Timeline

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

rsp.res here looks like an integer.

indygreg marked an inline comment as done.Feb 21 2018, 1:20 AM
indygreg added inline comments.
mercurial/wireprotoserver.py
424

This was fixed by b67d4b7e8235.