[PATCH] hgweb: display difference for a changeset against any parents (issue2810)
Weiwen Liu
weiwen at fb.com
Mon Nov 26 18:32:09 CST 2012
I looked at RunSymbol, and not sure how to get it to work.
To clarify, the object parent,
http://www.selenic.com/hg/file/d0d99c8bdf51/mercurial/hgweb/webutil.py#l82,
is implemented as a generator. As far as I know, generator can not be
reset. We can turn generator into a list so that we can iterate over it
multiple times. Do we want to increase complexity by changing generator
into list?
On 11/26/12 3:14 PM, "Matt Mackall" <mpm at selenic.com> wrote:
>On Mon, 2012-11-26 at 23:10 +0000, Weiwen Liu wrote:
>> Yes, the iterator is exhausted after we use it once. We used parent
>> iterator earlier on "<td class="author">{parent%changesetparent}</td>".
>>
>> Let me see if I can find a way to reset the iterator.
>
>Probably the most straightforward thing to do is to teach the template
>engine to turn iterators into lists when they're used. The right place
>to do that is probably here:
>
>http://www.selenic.com/hg/file/d0d99c8bdf51/mercurial/templater.py#l137
>
>--
>Mathematics is the supreme nostalgia of our time.
>
>
More information about the Mercurial-devel
mailing list