diff --git a/doc/hgrc.5.txt b/doc/hgrc.5.txt --- a/doc/hgrc.5.txt +++ b/doc/hgrc.5.txt @@ -525,6 +525,8 @@ web:: Default is "unknown". errorlog;; Where to output the error log. Default is stderr. + hidden;; + Whether to hide the repository in the hgwebdir index. Default is false. ipv6;; Whether to use IPv6. Default is false. name;; diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -142,6 +142,9 @@ class hgwebdir(object): def get(section, name, default=None): return u.config(section, name, default, untrusted=True) + if u.configbool("web", "hidden", untrusted=True): + continue + url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name]) .replace("//", "/")) + '/'