[PATCH 13 of 20] hgweb: remove first entry from the list for ajax log

Laurens Holst laurens.nospam at grauw.nl
Sat Aug 10 08:10:44 CDT 2013


Op 09-08-13 20:57, Alexander Plavin schreef:
> # HG changeset patch
> # User Alexander Plavin <alexander at plav.in>
> # Date 1376074124 -14400
> #      Fri Aug 09 22:48:44 2013 +0400
> # Node ID 015d43fca74b12c5c79ca14683d375dc9675fdd2
> # Parent  d29091e49e209d58302e2835a3cdf63b6df7f8f2
> hgweb: remove first entry from the list for ajax log
>
> This is needed because ajax requests next page starting with the last revision
> from the previous one.

Bit icky. Can’t you instead fix the request to start with the next revision?

If a requests asks for something it should get precisely that, not that 
+ 1...

>
> diff -r d29091e49e20 -r 015d43fca74b mercurial/hgweb/webcommands.py
> --- a/mercurial/hgweb/webcommands.py	Fri Aug 09 19:13:34 2013 +0400
> +++ b/mercurial/hgweb/webcommands.py	Fri Aug 09 22:48:44 2013 +0400
> @@ -320,6 +320,7 @@
>       template = shortlog and 'shortlog' or 'changelog'
>       if 'ajax' in req.form:
>           template += 'ajax'
> +        entries = entries[1:]
>   
>       return tmpl(template, changenav=changenav,
>                   node=ctx.hex(), rev=pos, changesets=count,
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>



More information about the Mercurial-devel mailing list