Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgweb_mod.py @ 25565:be4dc0007b8d
hgweb: add some in-code documentation for 'web.view'
This documentation was mostly intended for the user helps. However given the
lack of request for such feature, we should keep it un-documented. We stick the
help text in the code as it could still be useful to fellow contributors.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 07 Feb 2013 00:32:26 +0000 |
parents | 89ce95f907bd |
children | 328739ea70c3 |
comparison
equal
deleted
inserted
replaced
25564:847fce27effc | 25565:be4dc0007b8d |
---|---|
98 def configlist(self, section, name, default=None, untrusted=True): | 98 def configlist(self, section, name, default=None, untrusted=True): |
99 return self.repo.ui.configlist(section, name, default, | 99 return self.repo.ui.configlist(section, name, default, |
100 untrusted=untrusted) | 100 untrusted=untrusted) |
101 | 101 |
102 def _getview(self, repo): | 102 def _getview(self, repo): |
103 """The 'web.view' config controls changeset filter to hgweb. Possible | |
104 values are ``served``, ``visible`` and ``all``. Default is ``served``. | |
105 The ``served`` filter only shows changesets that can be pulled from the | |
106 hgweb instance. The``visible`` filter includes secret changesets but | |
107 still excludes "hidden" one. | |
108 | |
109 See the repoview module for details. | |
110 | |
111 The option has been around undocumented since Mercurial 2.5, but no | |
112 user ever asked about it. So we better keep it undocumented for now.""" | |
103 viewconfig = repo.ui.config('web', 'view', 'served', | 113 viewconfig = repo.ui.config('web', 'view', 'served', |
104 untrusted=True) | 114 untrusted=True) |
105 if viewconfig == 'all': | 115 if viewconfig == 'all': |
106 return repo.unfiltered() | 116 return repo.unfiltered() |
107 elif viewconfig in repoview.filtertable: | 117 elif viewconfig in repoview.filtertable: |