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

Matt Mackall mpm at selenic.com
Sat Nov 17 14:25:51 CST 2012


On Fri, 2012-11-16 at 19:28 +0000, Weiwen Liu wrote:
> Thanks for feedback.
> 
> On URL scheme, I like your suggestions.  diff/<node a>:<node b>
> extends diff command instead of introducing a new one.  And it follows
> more closely pattern in the NewWebInterface (NewWebInterface considers
> anything beyond the first node as file path). I will try this one out.
> 
> Conditional template is interesting.  
> Two new template variables are used: original node and baseline.
> With expansion of diff command, it makes it easier to know which
> baseline is used by displaying baseline info in the page.
> If a diff is against a node's only parent, we can skip the link for
> changing baseline.  If a diff is against a node's ancestor, or sibling
> from a different branch, it is convenient to have a link to see
> difference against direct parent.
> I prefer to keep these new variables for the purpose of consistency and simplicity in code.  Let me know if this makes sense.

The template needs the following information:

a) which two revs (x, y) are involved in the diff
b) the bits relevant to the "header" revision z

I'm pretty sure it makes sense for y to always be the same as z, so I
think the only additional information needed is x (usually the same as
p1(y)).

Note that the "list of choices of diff base" are already inherent in b
as p1 and p2.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list