graphs and the smart server

Robert Collins robertc at
Sun May 6 17:28:03 BST 2007

One of the challenges with the smart server is avoiding passing full
graphs over the wire: For large repositories the full graph is huge, and
a dominating factor on incremental push and pulls.

I've put together the basic logic to allow using a number of different
routines to build up a description of the revisions needed e.g. for log,
pull, etc.

At a design level the idea is to let the server provide an
opaque-to-the-client description of the graph, and a list of revisions
that the client should indicate local presence or absence of. This is
then used to refine the graph.

This approach can emulate the branch-point based routine that hg uses,
or a very dag-aware scheme equally. The initial approach I mocked up
does much better than pulling the knit index, for a bzr sized history.

I propose that we add a __iter__ method to Graph which will allow Graph
to be used as the input to various repository methods; then with an
InterRepository specialisation for to/from RemoteRepository, we can
transparently kick in this remote negotiation logic.

Current prototype/demo code is in two parts:
remote graph: s
'netsim' plugin:

GPG key available at: <>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : 

More information about the bazaar mailing list