Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 20575:3d77e567de56 stable
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.
author | Paul Boddie <paul@boddie.org.uk> |
---|---|
date | Thu, 27 Feb 2014 00:24:06 +0100 |
parents | 43cfad930d38 |
children | 0e757575aef5 |
comparison
equal
deleted
inserted
replaced
20565:f1c3ba167b0c | 20575:3d77e567de56 |
---|---|
363 url=url, | 363 url=url, |
364 description=description or "unknown", | 364 description=description or "unknown", |
365 description_sort=description.upper() or "unknown", | 365 description_sort=description.upper() or "unknown", |
366 lastchange=d, | 366 lastchange=d, |
367 lastchange_sort=d[1]-d[0], | 367 lastchange_sort=d[1]-d[0], |
368 archives=archivelist(u, "tip", url)) | 368 archives=archivelist(u, "tip", url), |
369 isdirectory=None) | |
369 | 370 |
370 seenrepos.add(name) | 371 seenrepos.add(name) |
371 yield row | 372 yield row |
372 | 373 |
373 sortdefault = None, False | 374 sortdefault = None, False |