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.
--- a/mercurial/hgweb/hgweb_mod.py Thu Jun 11 17:19:48 2015 -0700
+++ b/mercurial/hgweb/hgweb_mod.py Thu Feb 07 00:32:26 2013 +0000
@@ -100,6 +100,16 @@
untrusted=untrusted)
def _getview(self, repo):
+ """The 'web.view' config controls changeset filter to hgweb. Possible
+ values are ``served``, ``visible`` and ``all``. Default is ``served``.
+ The ``served`` filter only shows changesets that can be pulled from the
+ hgweb instance. The``visible`` filter includes secret changesets but
+ still excludes "hidden" one.
+
+ See the repoview module for details.
+
+ The option has been around undocumented since Mercurial 2.5, but no
+ user ever asked about it. So we better keep it undocumented for now."""
viewconfig = repo.ui.config('web', 'view', 'served',
untrusted=True)
if viewconfig == 'all':