[PATCH RFC v2] hgweb: improve annotate flow

Matt Mackall mpm at selenic.com
Thu May 17 09:12:23 CDT 2012


On Fri, 2012-05-11 at 10:50 +0200, Patrick Mezard wrote:
> # HG changeset patch
> # User Patrick Mezard <patrick at mezard.eu>
> # Date 1333549397 -7200
> # Node ID e7c2c26b9d539889ddaddea60c8ae5c42eb8729a
> # Parent  ddd4996740c785cc187766249977ea3ece8c17ab
> hgweb: improve annotate flow
> 
> [Only implemented for paper style, break the others]

I like this.

> The current hgweb annotate flow looks like:
> 
>   1- open file
>   2- annotate file
>   3- click on annotate link to open a new annotation
>   4- switch to changeset, select parent changeset, browse files, pick file
>   5- goto [1]
> 
> This patch turns it into:
> 
>   1- open file
>   2- annotate file
> 
>   3- click on annotate link to open the changeset at the right location
>   4- look at the hunk and click on the annotate link on the left
>   5- goto [3]
> 
> You can test it by opening (the host is slow, not this patch):
> 
>   http://mezard.eu/hg/hg-does-it-look-good-for-you/rev/c8e2a5ea7062
> 
> and trying to find when and why the:
> 
>   wctx.undelete([name])
> 
> line I removed in the changeset was introduced in the first place. Then compare
> with a regular setup, like:
> 
>   http://hg.intevation.org/mercurial/crew/rev/c8e2a5ea7062
> 
> Note 1: I am not an HTML guy, the new grey "ann" link in the changeset view
> should at least be blue like the regular annotate one, and there are probably
> better way to represent it. And I feel there ought to be better ways to do what
> I did with the templating system.
> 
> Note 2: the annotate step [3] could be skipped completely by moving from diffs
> to diffs. This is a little harder to implement though, as the changeset command
> would need to compute the annotate output to generate the "ann" links.

Yes, that's probably too expensive for full page generation. Short of
throwing some javascript at it to dynamically fetch annotation data when
you hover or something, there's not much we can do.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list