This is an archive of the discontinued Mercurial Phabricator instance.

wireprototypes: move wire protocol response types to new module
ClosedPublic

Authored by indygreg on Feb 7 2018, 7:27 PM.

Details

Summary

We'll be introducing more types as part of wire protocol version 2.
These types are shared between the command handling code (in
wireproto.py) and the protocol/transport code in wireprotoserver.py.
So they need to go in a new module to prevent a cycle.

The types are aliased into the wireproto module, so API compatibility
is preserved.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Feb 7 2018, 7:27 PM
indygreg updated this revision to Diff 5324.Feb 7 2018, 7:31 PM
indygreg updated this revision to Diff 5340.Feb 7 2018, 11:32 PM
indygreg updated this revision to Diff 5351.Feb 8 2018, 12:20 AM
durin42 accepted this revision.Feb 12 2018, 4:24 PM
This revision is now accepted and ready to land.Feb 12 2018, 4:24 PM

I wonder if these should move to being attrs-generated at some point.

This revision was automatically updated to reflect the committed changes.

I wonder if these should move to being attrs-generated at some point.

Probably. I'm half considering blowing up all these types because they are... not well-defined and behavior is overloaded. I'll definitely be creating new types for version 2 of the wire protocol. I'm waiting on that code to come into existence before touching these types because I'm not yet sure how everything will pan out.