##// END OF EJS Templates
hgweb: fix search {entries} to not return results of template expansion...
Yuya Nishihara -
r37418:47aea60d default
parent child Browse files
Show More
@@ -36,6 +36,7 b' from .. import ('
36 36 scmutil,
37 37 smartset,
38 38 templater,
39 templateutil,
39 40 )
40 41
41 42 from ..utils import (
@@ -287,7 +288,7 b' def _search(web):'
287 288 LookupError):
288 289 return MODE_KEYWORD, query
289 290
290 def changelist(**map):
291 def changelist(context):
291 292 count = 0
292 293
293 294 for ctx in searchfunc[0](funcarg):
@@ -303,7 +304,7 b' def _search(web):'
303 304 'changelogtag': showtags,
304 305 'files': files,
305 306 })
306 yield web.tmpl.generate('searchentry', lm)
307 yield lm
307 308
308 309 if count >= revcount:
309 310 break
@@ -349,7 +350,7 b' def _search(web):'
349 350 query=query,
350 351 node=tip.hex(),
351 352 symrev='tip',
352 entries=changelist,
353 entries=templateutil.mappinggenerator(changelist, name='searchentry'),
353 354 archives=web.archivelist('tip'),
354 355 morevars=morevars,
355 356 lessvars=lessvars,
@@ -57,7 +57,6 b" filenav = '{before%filenaventry}{after%f"
57 57
58 58 fileellipses = '...'
59 59 changelogentry = changelogentry.tmpl
60 searchentry = changelogentry.tmpl
61 60 changeset = changeset.tmpl
62 61 manifest = manifest.tmpl
63 62 direntry = '
@@ -30,6 +30,6 b''
30 30
31 31 <div class="title">searching for {query|escape}</div>
32 32
33 {entries}
33 {entries%changelogentry}
34 34
35 35 {footer}
@@ -18,9 +18,8 b" lineentry = '\\{"
18 18 search = '\{
19 19 "node": {node|json},
20 20 "query": {query|json},
21 "entries": [{join(entries%searchentry, ", ")}]
21 "entries": [{join(entries%changelistentry, ", ")}]
22 22 }'
23 searchentry = '{changelistentry}'
24 23 # changelog and shortlog are the same web API but with different
25 24 # number of entries.
26 25 changelog = changelist.tmpl
@@ -57,7 +57,6 b" filenav = '{before%filenaventry}{after%f"
57 57
58 58 fileellipses = '...'
59 59 changelogentry = changelogentry.tmpl
60 searchentry = changelogentry.tmpl
61 60 changeset = changeset.tmpl
62 61 manifest = manifest.tmpl
63 62 direntry = '
@@ -26,6 +26,6 b''
26 26 </div>
27 27
28 28 <h2 class="no-link no-border">searching for {query|escape}</h2>
29 {entries}
29 {entries%changelogentry}
30 30
31 31 {footer}
@@ -33,7 +33,6 b" fileellipses = '...'"
33 33 diffstatlink = diffstat.tmpl
34 34 diffstatnolink = diffstat.tmpl
35 35 changelogentry = shortlogentry.tmpl
36 searchentry = shortlogentry.tmpl
37 36 changeset = changeset.tmpl
38 37 manifest = manifest.tmpl
39 38
@@ -49,7 +49,7 b" Use {showunforcekw}</a> instead.')}"
49 49 </tr>
50 50 </thead>
51 51 <tbody class="stripes2">
52 {entries}
52 {entries%changelogentry}
53 53 </tbody>
54 54 </table>
55 55
@@ -3,7 +3,6 b' shortlog = "\'raw\' is not a browsable sty'
3 3 changelog = changelog.tmpl
4 4 changelogentry = logentry.tmpl
5 5 search = search.tmpl
6 searchentry = logentry.tmpl
7 6 mimetype = 'text/plain; charset={encoding}'
8 7 header = ''
9 8 footer = ''
@@ -17,7 +17,6 b' filenodelink = \'<a href="{url|urlescape}'
17 17 filenolink = '{file|escape} '
18 18 fileellipses = '...'
19 19 changelogentry = changelogentry.tmpl
20 searchentry = changelogentry.tmpl
21 20 changeset = changeset.tmpl
22 21 manifest = manifest.tmpl
23 22
@@ -24,7 +24,7 b' search:'
24 24 </p>
25 25 </form>
26 26
27 {entries}
27 {entries%changelogentry}
28 28
29 29 <form>
30 30 {sessionvars%hiddenformentry}
General Comments 0
You need to be logged in to leave comments. Login now