Mercurial > hg
changeset 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 | 4b86f4f199a9 |
children | bcf59ddc6173 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Apr 05 14:30:52 2019 -0400 +++ b/mercurial/localrepo.py Sat Apr 06 10:44:22 2019 +0200 @@ -1179,7 +1179,17 @@ return self def filtered(self, name, visibilityexceptions=None): - """Return a filtered version of a repository""" + """Return a filtered version of a repository + + The `name` parameter is the identifier of the requested view. This + will return a repoview object set "exactly" to the specified view. + + This function does not apply recursive filtering to a repository. For + example calling `repo.filtered("served")` will return a repoview using + the "served" view, regardless of the initial view used by `repo`. + + In other word, there is always only one level of `repoview` "filtering". + """ cls = repoview.newtype(self.unfiltered().__class__) return cls(self, name, visibilityexceptions)