hgweb: fix search {entries} to not return results of template expansion
"{entries%changelogentry}" in raw/search.tmpl was utterly wrong because "{entries}" here was a generator yielding results of template expansion. That's why we have a weird hack in runmap(), which I'm going to get rid of. https://www.mercurial-scm.org/repo/hg/file/4.5.2/mercurial/templater.py#l469 We have two choices: a) drop "%changelogentry" from raw/search.tmpl b) fix "{entries}" to yield mappings I take (b) because that's what the other log-like "{entries}" do. The "entries" keyword is wrapped by mappinggenerator so "{entries}" without "%searchentry" still works.
Showing
- mercurial/hgweb/webcommands.py 4 additions, 3 deletionsmercurial/hgweb/webcommands.py
- mercurial/templates/gitweb/map 0 additions, 1 deletionmercurial/templates/gitweb/map
- mercurial/templates/gitweb/search.tmpl 1 addition, 1 deletionmercurial/templates/gitweb/search.tmpl
- mercurial/templates/json/map 1 addition, 2 deletionsmercurial/templates/json/map
- mercurial/templates/monoblue/map 0 additions, 1 deletionmercurial/templates/monoblue/map
- mercurial/templates/monoblue/search.tmpl 1 addition, 1 deletionmercurial/templates/monoblue/search.tmpl
- mercurial/templates/paper/map 0 additions, 1 deletionmercurial/templates/paper/map
- mercurial/templates/paper/search.tmpl 1 addition, 1 deletionmercurial/templates/paper/search.tmpl
- mercurial/templates/raw/map 0 additions, 1 deletionmercurial/templates/raw/map
- mercurial/templates/spartan/map 0 additions, 1 deletionmercurial/templates/spartan/map
- mercurial/templates/spartan/search.tmpl 1 addition, 1 deletionmercurial/templates/spartan/search.tmpl
Loading
Please register or sign in to comment