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

Alexander Plavin alexander at plav.in
Mon Aug 12 13:57:52 CDT 2013



10.08.2013, 17:10, "Laurens Holst" <laurens.nospam at grauw.nl>:
> 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?

I'll think about this, may be it's better to use just revision number at the ajax query instead of the hash - then it will be easier to advance it by one.

>
> 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
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list