Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/wireproto.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 | ca6accdad79c |
children | f9fc46698352 |
comparison
equal
deleted
inserted
replaced
15712:06b8b74720d6 | 15713:cff25e4b37d2 |
---|---|
8 import urllib, tempfile, os, sys | 8 import urllib, tempfile, os, sys |
9 from i18n import _ | 9 from i18n import _ |
10 from node import bin, hex | 10 from node import bin, hex |
11 import changegroup as changegroupmod | 11 import changegroup as changegroupmod |
12 import repo, error, encoding, util, store | 12 import repo, error, encoding, util, store |
13 import phases | |
13 | 14 |
14 # abstract batching support | 15 # abstract batching support |
15 | 16 |
16 class future(object): | 17 class future(object): |
17 '''placeholder for a value to be set later''' | 18 '''placeholder for a value to be set later''' |
447 opts[k] = decodelist(v) | 448 opts[k] = decodelist(v) |
448 cg = repo.getbundle('serve', **opts) | 449 cg = repo.getbundle('serve', **opts) |
449 return streamres(proto.groupchunks(cg)) | 450 return streamres(proto.groupchunks(cg)) |
450 | 451 |
451 def heads(repo, proto): | 452 def heads(repo, proto): |
452 h = repo.heads() | 453 h = phases.visibleheads(repo) |
453 return encodelist(h) + "\n" | 454 return encodelist(h) + "\n" |
454 | 455 |
455 def hello(repo, proto): | 456 def hello(repo, proto): |
456 '''the hello command returns a set of lines describing various | 457 '''the hello command returns a set of lines describing various |
457 interesting things about the server, in an RFC822-like format. | 458 interesting things about the server, in an RFC822-like format. |