states/phases plan: exchange boundary

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Oct 9 18:51:52 CDT 2011


During initial discussion about States Plan we decide to use pushkey to exchange states boundary. However It doesn't seems optimal to use pushkey in this case.

Issue
---------------

After a push or a pull they might still be changeset that belong to local or remote only. Those exclusive changeset might be part of the boundary If the boundary are exchanged as is, unknown node can't be processed. They might be ignored or the exchange logic may try to find a common ancestor for this node.


Example
---------------

** initial state **

Here is a small example

Local


	      / E
	A - B - C - D

	The local boundary is [B]

Remote



	      / E - F
	A - B 

The remote boundary is [F]


** We push local to remote **

Local is unchanged and remove now look like this

	      / E - F
	A - B - C - D

	The remote boundary is [F, D]


Local and remote now exchange boundary:

	"F" is unknown to local. Local can either leave E alone or start a roundtrip as a common ancestor (it's cheap here because the graph is simple and small).


Solution
---------------

We already computed common nodes, before pull/push. As we also know what have be exchange we know common nodes *after* the pull/push too. We could use this knowledge to ask the remote for boundary in this specific common subset. I don't think this is possible through pushkey and would require a new wireprotocol command.


-- 
Pierre-Yves


More information about the Mercurial-devel mailing list