Module dag::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

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

Traits

Abstraction of network protocols.