comparison mercurial/localrepo.py @ 42105:e0357a46c39d

repoview: improve documentation for `repo.filtered` method I am sitting next to Joerg Sonnenberger and we are discussion his experience with repoview. This first effect of this discussion is this documentation clarification.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 06 Apr 2019 10:44:22 +0200
parents fcd7a91dec23
children 70b71421fd33
comparison
equal deleted inserted replaced
42104:4b86f4f199a9 42105:e0357a46c39d
1177 1177
1178 Intended to be overwritten by filtered repo.""" 1178 Intended to be overwritten by filtered repo."""
1179 return self 1179 return self
1180 1180
1181 def filtered(self, name, visibilityexceptions=None): 1181 def filtered(self, name, visibilityexceptions=None):
1182 """Return a filtered version of a repository""" 1182 """Return a filtered version of a repository
1183
1184 The `name` parameter is the identifier of the requested view. This
1185 will return a repoview object set "exactly" to the specified view.
1186
1187 This function does not apply recursive filtering to a repository. For
1188 example calling `repo.filtered("served")` will return a repoview using
1189 the "served" view, regardless of the initial view used by `repo`.
1190
1191 In other word, there is always only one level of `repoview` "filtering".
1192 """
1183 cls = repoview.newtype(self.unfiltered().__class__) 1193 cls = repoview.newtype(self.unfiltered().__class__)
1184 return cls(self, name, visibilityexceptions) 1194 return cls(self, name, visibilityexceptions)
1185 1195
1186 @repofilecache('bookmarks', 'bookmarks.current') 1196 @repofilecache('bookmarks', 'bookmarks.current')
1187 def _bookmarks(self): 1197 def _bookmarks(self):