[PATCH] hgweb: display difference for a changeset against any parents (issue2810)

Weiwen Liu weiwen at fb.com
Thu Nov 29 15:34:43 CST 2012


The idea in join() is interesting.  I have been wondering all those trailing space at the end of template.

mercurial/templates/paper/map has 12 places with trailing space.  Most of them are coupled with iterator.

I suggest filing a bug to get all these cleaned.

________________________________________
From: Matt Mackall [mpm at selenic.com]
Sent: Thursday, November 29, 2012 11:46 AM
To: Kevin Bullock
Cc: Weiwen Liu; mercurial-devel at selenic.com; Bryan O'Sullivan
Subject: Re: [PATCH] hgweb: display difference for a changeset against any parents (issue2810)

On Thu, 2012-11-29 at 12:02 -0600, Kevin Bullock wrote:
> On Nov 29, 2012, at 12:00 PM, Weiwen Liu wrote:
>
> > I looked at the result after removing spaces.
> >
> > Removing space from
> >> + <td class="author"><a href="{url}rev/{currentbaseline|short}{sessionvars%urlparameter}">{currentbaseline|short}</a> </td>
> > works fine.
> >
> > After removing space from
> >> +changesetbaseline = '<a href="{url}rev/{node|short}:{originalnode|short}{sessionvars%urlparameter}">{node|short} </a> '
> > we display two parents without space in between.  We need to keep the space here.  The changesetparent has a space at the end for the same reason.  I will keep this space.
>
> Makes sense, but let's at least eliminate the extra space *before* the </a>.

Please check out the templater's join() function.

--
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list