Submitter | Pierre-Yves David |
---|---|
Date | April 12, 2019, 2:45 p.m. |
Message ID | <5577867904fc94dc63c4.1555080303@nodosa.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/39567/ |
State | Accepted |
Headers | show |
Comments
On Fri, Apr 12, 2019 at 6:03 PM Pierre-Yves David < pierre-yves.david@ens-lyon.org> wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@octobus.net> > # Date 1554540262 -7200 > # Sat Apr 06 10:44:22 2019 +0200 > # Node ID 5577867904fc94dc63c4251641e146e087328508 > # Parent 509a0477b3a6e9f1ea0fe32bfb028c256aada7fa > # EXP-Topic repoview > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r > 5577867904fc > 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. > I have queued the first two. Many thanks! Will try to get back to rest if no-one beats me to it.
Patch
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1179,7 +1179,17 @@ class localrepository(object): 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)