# HG changeset patch # User Alexander Plavin # Date 1373547714 -14400 # Node ID afc23eddc324cf150346cbb0d0673788b6a86b66 # Parent 19622224559bc68fb6b32b1cc0d5920aa77b4c40 hgweb: show current search query in the input field diff -r 19622224559b -r afc23eddc324 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Sun Jul 14 17:23:07 2013 +0200 +++ b/mercurial/hgweb/webcommands.py Thu Jul 11 17:01:54 2013 +0400 @@ -185,11 +185,13 @@ def changelog(web, req, tmpl, shortlog=False): + query = '' if 'node' in req.form: ctx = webutil.changectx(web.repo, req) else: if 'rev' in req.form: - hi = req.form['rev'][0] + query = req.form['rev'][0] + hi = query else: hi = 'tip' try: @@ -256,7 +258,7 @@ entries=lambda **x: changelist(latestonly=False, **x), latestentry=lambda **x: changelist(latestonly=True, **x), archives=web.archivelist("tip"), revcount=revcount, - morevars=morevars, lessvars=lessvars) + morevars=morevars, lessvars=lessvars, query=query) def shortlog(web, req, tmpl): return changelog(web, req, tmpl, shortlog = True) diff -r 19622224559b -r afc23eddc324 mercurial/templates/paper/search.tmpl --- a/mercurial/templates/paper/search.tmpl Sun Jul 14 17:23:07 2013 +0200 +++ b/mercurial/templates/paper/search.tmpl Thu Jul 11 17:01:54 2013 +0400 @@ -25,7 +25,7 @@ diff -r 19622224559b -r afc23eddc324 mercurial/templates/paper/shortlog.tmpl --- a/mercurial/templates/paper/shortlog.tmpl Sun Jul 14 17:23:07 2013 +0200 +++ b/mercurial/templates/paper/shortlog.tmpl Thu Jul 11 17:01:54 2013 +0400 @@ -44,7 +44,7 @@ diff -r 19622224559b -r afc23eddc324 tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Sun Jul 14 17:23:07 2013 +0200 +++ b/tests/test-hgweb-commands.t Thu Jul 11 17:01:54 2013 +0400 @@ -289,7 +289,7 @@ @@ -525,7 +525,7 @@ diff -r 19622224559b -r afc23eddc324 tests/test-hgweb-empty.t --- a/tests/test-hgweb-empty.t Sun Jul 14 17:23:07 2013 +0200 +++ b/tests/test-hgweb-empty.t Thu Jul 11 17:01:54 2013 +0400 @@ -62,7 +62,7 @@ @@ -155,7 +155,7 @@