[PATCH 2 of 4 V6] hgweb: display blamed revision once per block in annotate view

Gregory Szorc gregory.szorc at gmail.com
Fri Jun 24 20:22:22 EDT 2016


On Fri, Jun 24, 2016 at 5:39 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> On Thu, 16 Jun 2016 15:58:17 +0200, Denis Laxalde wrote:
> > # HG changeset patch
> > # User Denis Laxalde <denis.laxalde at logilab.fr>
> > # Date 1465294201 -7200
> > #      Tue Jun 07 12:10:01 2016 +0200
> > # Node ID 8829839dfd23c9caa5f368a7367559a6bc3593bb
> > # Parent  6ef96d3a3dc685edabc0f5ef653c31d9fece2916
> > hgweb: display blamed revision once per block in annotate view
>
> > --- a/mercurial/hgweb/webcommands.py
> > +++ b/mercurial/hgweb/webcommands.py
> > @@ -872,14 +872,19 @@ def annotate(web, req, tmpl):
> >          else:
> >              lines = enumerate(fctx.annotate(follow=True,
> linenumber=True,
> >                                              diffopts=diffopts))
> > +        previousrev = None
> >          for lineno, ((f, targetline), l) in lines:
> > +            rev = f.rev()
> > +            blockhead = rev != previousrev or None
>
> Just a random thought, but if blockhead is the number of lines in that
> block,
> it could be used as a rowspan value.
>

And this could potentially be combined with some CSS/JS foo so the text
never scrolls out of window if you e.g. have a block hundreds of lines
long. Alternatively, we could ensure there is a link every N rows (you
shouldn't need to scroll to find a link).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160624/1e51ca15/attachment.html>


More information about the Mercurial-devel mailing list