Mercurial > public > mercurial-scm > hg
diff mercurial/setdiscovery.py @ 15713:cff25e4b37d2
phases: do not exchange secret changesets
Any secret changesets will be excluded from pull and push. Phase data are
properly synchronized on pull and push if a changeset is seen as secret locally
but is non-secret remote side.
This patch does not handle the case of a changeset secret on remote but known
locally.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 22 Dec 2011 00:42:25 +0100 |
parents | 9bea3aed6ee1 |
children | 525fdb738975 |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Thu Dec 22 00:40:46 2011 +0100 +++ b/mercurial/setdiscovery.py Thu Dec 22 00:42:25 2011 +0100 @@ -9,6 +9,7 @@ from node import nullid from i18n import _ import random, collections, util, dagutil +import phases def _updatesample(dag, nodes, sample, always, quicksamplesize=0): # if nodes is empty we scan the entire graph @@ -99,7 +100,7 @@ sample = ownheads if remote.local(): # stopgap until we have a proper localpeer that supports batch() - srvheadhashes = remote.heads() + srvheadhashes = phases.visibleheads(remote) yesno = remote.known(dag.externalizeall(sample)) elif remote.capable('batch'): batch = remote.batch()