annotate mercurial/help/internals/wireprotocol.txt @ 29859:a1092e2d70a3

help: internals topic for wire protocol The Mercurial wire protocol is under-documented. This includes a lack of source docstrings and comments as well as pages on the official wiki. This patch adds the beginnings of "internals" documentation on the wire protocol. The documentation should have nearly complete coverage on the lower-level parts of the protocol, such as the different transport mechanims, how commands and arguments are sent, capabilities, and, of course, the commands themselves. As part of writing this documentation, I discovered a number of deficiencies in the protocol and bugs in the implementation. I've started sending patches for some of the issues. I hope to send a lot more. This patch starts with the scaffolding for a new internals page.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 22 Aug 2016 19:46:39 -0700
parents
children b42c26b0a785
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29859
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1 The Mercurial wire protocol is a request-response based protocol
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2 with multiple wire representations.
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4 Each request is modeled as a command name, a dictionary of arguments, and
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5 optional raw input. Command arguments and their types are intrinsic
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 properties of commands. So is the response type of the command. This means
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7 clients can't always send arbitrary arguments to servers and servers can't
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
8 return multiple response types.
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10 The protocol is synchronous and does not support multiplexing (concurrent
a1092e2d70a3 help: internals topic for wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 commands).