Status: Draft/Experiment
Proposed new discovery/changegroup protocol
The wire protocol has several flaws:
- it uses the roots of the new branches, this is susceptible to a race (see issue1320) .
- if the client is missing a lot of nodes but doesn't have any local changes, it will still have to do a lot of roundtrips to discover the base nodes.
See WireProtocol for the current protocol.
Overview
The Protocol
The current changegroup() uses base nodes, it should instead use common nodes. changegroup(roots, heads)
- roots = list of nodes, that the server can assume the client knows (as well as all their ancestors).
find all changesets ancestors from heads and not descended from roots and return them as a single changegroup
A changegroup is a single stream containing:
- a changelog group
- a manifest group
- a list of
- filename length
- filename
- file group (terminated by a zero length filename)
A group is a list of chunks:
- chunk length
- self hash, p1 hash, p2 hash, link hash
- uncompressed delta to p1 (or optionally to the previous node)
- (terminated by a zero length chunk)
Wishlist
- Estimate early how much data or items have to be transfered and communicate this to the other side, so a progress indicator could be more useful.
-- ThomasArendsenHein 2008-10-24 14:23:01