[PATCH 04 of 11] hgweb: handle a "linerange" request parameter in filelog command

Gregory Szorc gregory.szorc at gmail.com
Tue Feb 28 23:23:05 UTC 2017


On Thu, Feb 23, 2017 at 6:54 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> On Wed, 22 Feb 2017 16:09:58 +0100, Denis Laxalde wrote:
> > # HG changeset patch
> > # User Denis Laxalde <denis.laxalde at logilab.fr>
> > # Date 1484844060 -3600
> > #      Thu Jan 19 17:41:00 2017 +0100
> > # Node ID 4d83e067c9c6e0f5fb7b126a9739aa9dd8113af4
> > # Parent  0a725b74eeb2a8eca6d1d82ba8ec8c2d188e8684
> > # EXP-Topic linerange-log/hgweb-filelog
> > 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>
>
> Nit: how about copying the <fromline>:<toline> syntax from revset?
>

I agree with this suggestion (consistency is good) and see it has been
incorporated into the v2 series. However, I'd like to state for the record
that ':' is a reserved character in URLs and needs to be percent escaped.
So that's slightly annoying, especially for power users that may wish to
tweak URLs in their browser. Although, I'm pretty sure the URL parsers in
browsers will allow the literal ':' so it shouldn't be a big deal in
practice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170228/77cbed9a/attachment-0002.html>


More information about the Mercurial-devel mailing list