Mercurial > hg
diff mercurial/templates/paper/filelog.tmpl @ 31665:5e6d44511317
hgweb: handle a "linerange" request parameter in filelog command
We now handle a "linerange" URL query parameter to filter filelog using
a logic similar to followlines() revset.
The URL syntax is: log/<rev>/<file>?linerange=<fromline>:<toline>
As a result, filelog entries only consists of revision changing specified
line range.
The linerange information is propagated to "more"/"less" navigation links but
not to numeric navigation links as this would apparently require a dedicated
"revnav" class.
Only update the "paper" template in this patch.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 19 Jan 2017 17:41:00 +0100 |
parents | 1c66497261b2 |
children | 604d31507f86 |
line wrap: on
line diff
--- a/mercurial/templates/paper/filelog.tmpl Sun Mar 26 16:51:19 2017 -0700 +++ b/mercurial/templates/paper/filelog.tmpl Thu Jan 19 17:41:00 2017 +0100 @@ -47,6 +47,8 @@ <h3> log {file|escape} @ {rev}:<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag} + {if(linerange, +' (following lines {linerange} <a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">back to filelog</a>)')} </h3> <form class="search" action="{url|urlescape}log">