diff -r 448486e12c13 -r d8e55c0c642c mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Thu Jul 13 23:43:16 2017 -0700 +++ b/mercurial/hgweb/hgwebdir_mod.py Tue May 16 11:00:38 2017 -0700 @@ -414,14 +414,10 @@ return self.makeindex(req, res, tmpl, subdir) def _virtualdirs(): - # Check the full virtual path, each parent, and the root ('') - if virtual != '': - yield virtual - - for p in util.finddirs(virtual): - yield p - - yield '' + # Check the full virtual path, and each parent + yield virtual + for p in util.finddirs(virtual): + yield p for virtualrepo in _virtualdirs(): real = repos.get(virtualrepo)