--- a/mercurial/hgweb/webcommands.py Sat Jul 13 17:51:24 2013 +0400
+++ b/mercurial/hgweb/webcommands.py Mon Jul 15 01:05:42 2013 +0400
@@ -110,20 +110,6 @@
def _search(web, req, tmpl):
- query = req.form['rev'][0]
- revcount = web.maxchanges
- if 'revcount' in req.form:
- revcount = int(req.form.get('revcount', [revcount])[0])
- revcount = max(revcount, 1)
- tmpl.defaults['sessionvars']['revcount'] = revcount
-
- lessvars = copy.copy(tmpl.defaults['sessionvars'])
- lessvars['revcount'] = max(revcount / 2, 1)
- lessvars['rev'] = query
- morevars = copy.copy(tmpl.defaults['sessionvars'])
- morevars['revcount'] = revcount * 2
- morevars['rev'] = query
-
def changelist(**map):
count = 0
lower = encoding.lower
@@ -176,6 +162,20 @@
if count >= revcount:
break
+ query = req.form['rev'][0]
+ revcount = web.maxchanges
+ if 'revcount' in req.form:
+ revcount = int(req.form.get('revcount', [revcount])[0])
+ revcount = max(revcount, 1)
+ tmpl.defaults['sessionvars']['revcount'] = revcount
+
+ lessvars = copy.copy(tmpl.defaults['sessionvars'])
+ lessvars['revcount'] = max(revcount / 2, 1)
+ lessvars['rev'] = query
+ morevars = copy.copy(tmpl.defaults['sessionvars'])
+ morevars['revcount'] = revcount * 2
+ morevars['rev'] = query
+
tip = web.repo['tip']
parity = paritygen(web.stripecount)