Module protocol

Source
Expand description

§protocol

Abstractions used for communication between (sparse_idmap1, segments1) (usually, a client) and (complete_idmap2, segments2) (usually, a server).

When the sparse idmap gets asked to convert unknown id or name, it goes through the following flow to find the answer:

  • Id -> Name: Id -> RequestLocationToName -> ResponseIdNamePair -> Name
  • Name -> Id: Name -> RequestNameToLocation -> ResponseIdNamePair -> Id

Structs§

AncestorPath
The n-th first ancestor of x. x~n in hg revset syntax. Usually, x is commonly known by the client and the server.
RequestLocationToName
Request for converting locations to names (commit hashes). Useful for converting ids to names.
RequestNameToLocation
Request for locating names (commit hashes) in a IdDag. Useful for converting names to ids.
ResponseIdNamePair
Response for converting names to ids or converting names to ids.

Traits§

RemoteIdConvertProtocol
Abstraction of network protocols.