##// END OF EJS Templates
hgweb: add dynamic search function selection, depending on the query...
Alexander Plavin -
r19631:cf9e5e45 default
parent child Browse files
Show More
@@ -138,10 +138,17 b' def _search(web, req, tmpl):'
138 138
139 139 yield ctx
140 140
141 searchfuncs = {
142 'keyword': keywordsearch,
143 }
144
145 def getsearchmode():
146 return 'keyword'
147
141 148 def changelist(**map):
142 149 count = 0
143 150
144 for ctx in keywordsearch():
151 for ctx in searchfunc():
145 152 count += 1
146 153 n = ctx.node()
147 154 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
@@ -181,6 +188,9 b' def _search(web, req, tmpl):'
181 188 morevars['revcount'] = revcount * 2
182 189 morevars['rev'] = query
183 190
191 mode = getsearchmode()
192 searchfunc = searchfuncs[mode]
193
184 194 tip = web.repo['tip']
185 195 parity = paritygen(web.stripecount)
186 196
General Comments 0
You need to be logged in to leave comments. Login now