[PATCH] [RFC] wireproto: avoid discovery when local graph is a subset of remote

Matt Mackall mpm at selenic.com
Mon Mar 14 13:52:59 CDT 2011


On Sun, 2011-03-13 at 13:09 +0100, Peter Arrenbrecht wrote:
> # HG changeset patch
> # User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
> # Date 1300018073 -3600
> [RFC] wireproto: avoid discovery when local graph is a subset of remote
> 
> The idea is to immediately send local's heads to the server to check whether the server
> knows them all. If it does, we can request a changegroup immediately. This required the
> introduction of two new wireproto calls:
> 
>   known([Node]) -> [1/0]
>     Returns 1/0 for each node, indicating whether it's known by the server.

Ok. Separate patch, please.

>   changegroupdiff(commonheads, heads, ...)
>     Returns the changegroup for everything ancestral of heads, but not ancestral of
>     commonheads.

This is a problem. We've got like four features that want to send a new
type of changegroup, I'm not going to add four new commands. We've had
varargs support in the protocol for most of a year now precisely so that
a future changegroup command could take feature flags.

We should aim to add only one new changegroup command. And ideally
engineer it such that we can hide all the fallback code in wireproto.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list