Submitter | Alexander Plavin |
---|---|
Date | Aug. 16, 2013, 8 p.m. |
Message ID | <7de4329371abefa30c97.1376683244@debian-alexander.dolgopa> |
Download | mbox | patch |
Permalink | /patch/2180/ |
State | Superseded |
Headers | show |
Comments
Patch
diff -r 74dbeaab9631 -r 7de4329371ab mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Wed Jul 24 03:20:26 2013 +0400 +++ b/mercurial/hgweb/webcommands.py Fri Aug 16 15:35:44 2013 +0400 @@ -138,10 +138,17 @@ yield ctx + searchfuncs = { + 'kw': keywordsearch, + } + + def getsearchmode(): + return 'kw' + def changelist(**map): count = 0 - for ctx in keywordsearch(): + for ctx in searchfunc(): count += 1 n = ctx.node() showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n) @@ -181,6 +188,8 @@ morevars['revcount'] = revcount * 2 morevars['rev'] = query + searchfunc = searchfuncs[getsearchmode()] + tip = web.repo['tip'] parity = paritygen(web.stripecount)