Mercurial > hg
changeset 18281:898c575833c9
clfilter: drop extra filtering in wireprotocol
The repository used by wireprotocol is already filtered. We no
longer need to call special functions.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 06 Jan 2013 04:36:30 +0100 |
parents | 47abbaabaaa5 |
children | 595bd4c5b135 |
files | mercurial/wireproto.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireproto.py Sun Jan 06 04:37:33 2013 +0100 +++ b/mercurial/wireproto.py Sun Jan 06 04:36:30 2013 +0100 @@ -10,7 +10,6 @@ from node import bin, hex import changegroup as changegroupmod import peer, error, encoding, util, store -import discovery, phases # abstract batching support @@ -401,7 +400,7 @@ return "".join(r) def branchmap(repo, proto): - branchmap = discovery.visiblebranchmap(repo) + branchmap = repo.branchmap() heads = [] for branch, nodes in branchmap.iteritems(): branchname = urllib.quote(encoding.fromlocal(branch)) @@ -457,7 +456,7 @@ return streamres(proto.groupchunks(cg)) def heads(repo, proto): - h = discovery.visibleheads(repo) + h = repo.heads() return encodelist(h) + "\n" def hello(repo, proto): @@ -480,8 +479,6 @@ try: k = encoding.tolocal(key) c = repo[k] - if c.phase() == phases.secret: - raise error.RepoLookupError(_("unknown revision '%s'") % k) r = c.hex() success = 1 except Exception, inst: @@ -595,7 +592,7 @@ their_heads = decodelist(heads) def check_heads(): - heads = discovery.visibleheads(repo) + heads = repo.heads() heads_hash = util.sha1(''.join(sorted(heads))).digest() return (their_heads == ['force'] or their_heads == heads or their_heads == ['hashed', heads_hash])