# HG changeset patch # User Paul Boddie # Date 1393457046 -3600 # Node ID 3d77e567de56c9f8a45073db654c58a05f7851a2 # Parent f1c3ba167b0c73207c726b5a68c59c9b14560d2e hgweb: ensure isdirectory is None for repositories, replacing any True value Until now, repositories did not provide any value for isdirectory in rows produced for the index output, and thus isdirectory was generally evaluated as None for each index entry representing a repository. However, directories (visible when viewed with the descend and collapse settings enabled) did provide a value of True and this value appeared to persist in subsequent rows processed by the templater, causing isdirectory tests in templates to produce incorrect results for index entries appearing after directories. This patch asserts the None value for repositories, thus erasing any such persistent True values. diff -r f1c3ba167b0c -r 3d77e567de56 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Tue Feb 25 06:30:21 2014 +0530 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Feb 27 00:24:06 2014 +0100 @@ -365,7 +365,8 @@ description_sort=description.upper() or "unknown", lastchange=d, lastchange_sort=d[1]-d[0], - archives=archivelist(u, "tip", url)) + archives=archivelist(u, "tip", url), + isdirectory=None) seenrepos.add(name) yield row