comparison mercurial/hg.py @ 18303:4d1671b39168

clfilter: enforce hidden filtering on all repository accesses We ensure all repositores created through `mercurial.hg.repository` are "hidden" filtered. This is an even stronger enforcement than 5bb610f87d1d. Citing Matt's response to changeset 5bb610f87d1d installing filtering in dispatch: > Unfortunately, this means that code that doesn't go through dispatch (ie all > those crazy misguided people using Mercurial as a library) are going to see > these hidden changesets. > > Might be better to instead install the filter in localrepo construction by > default and disable it in dispatch.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Fri, 11 Jan 2013 20:34:54 +0100
parents fd903f89e42b
children f3b21beb9802
comparison
equal deleted inserted replaced
18302:16c642a6f07d 18303:4d1671b39168
111 peer = _peerorrepo(ui, path, create) 111 peer = _peerorrepo(ui, path, create)
112 repo = peer.local() 112 repo = peer.local()
113 if not repo: 113 if not repo:
114 raise util.Abort(_("repository '%s' is not local") % 114 raise util.Abort(_("repository '%s' is not local") %
115 (path or peer.url())) 115 (path or peer.url()))
116 return repo 116 return repo.filtered('hidden')
117 117
118 def peer(uiorrepo, opts, path, create=False): 118 def peer(uiorrepo, opts, path, create=False):
119 '''return a repository peer for the specified path''' 119 '''return a repository peer for the specified path'''
120 rui = remoteui(uiorrepo, opts) 120 rui = remoteui(uiorrepo, opts)
121 return _peerorrepo(rui, path, create).peer() 121 return _peerorrepo(rui, path, create).peer()