Mercurial > hg
comparison mercurial/localrepo.py @ 18278:753acee7d6dd
clfilter: make localpeer use a repo with "unserved" filter
This changeset installs a broad filter on most repos used for
serving. This removes the need to use the `visiblehead`/`visiblebranchmap`
functions, and ensures that changesets we should not serve are in
fact never served.
We do not use filtering on hgweb yet, as there is still a number
of issues to solve there.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 06 Jan 2013 04:41:11 +0100 |
parents | a32255dee859 |
children | 679767c38cb5 |
comparison
equal
deleted
inserted
replaced
18277:a58260bc101f | 18278:753acee7d6dd |
---|---|
64 class localpeer(peer.peerrepository): | 64 class localpeer(peer.peerrepository): |
65 '''peer for a local repo; reflects only the most recent API''' | 65 '''peer for a local repo; reflects only the most recent API''' |
66 | 66 |
67 def __init__(self, repo, caps=MODERNCAPS): | 67 def __init__(self, repo, caps=MODERNCAPS): |
68 peer.peerrepository.__init__(self) | 68 peer.peerrepository.__init__(self) |
69 self._repo = repo | 69 self._repo = repo.filtered('unserved') |
70 self.ui = repo.ui | 70 self.ui = repo.ui |
71 self._caps = repo._restrictcapabilities(caps) | 71 self._caps = repo._restrictcapabilities(caps) |
72 self.requirements = repo.requirements | 72 self.requirements = repo.requirements |
73 self.supportedformats = repo.supportedformats | 73 self.supportedformats = repo.supportedformats |
74 | 74 |