[PATCH] hgweb: make graph data suitable for template usage
Paul Boddie
paul at boddie.org.uk
Thu May 17 11:07:38 CDT 2012
On Thursday 17 May 2012 17:54:45 Dirkjan Ochtman wrote:
> On Thu, May 3, 2012 at 1:08 AM, Paul Boddie <paul at boddie.org.uk> wrote:
> > In order to test these changes, the raw theme has been modified
> > to include templates for graph nodes and edges. In a similar
> > fashion, themes could employ technologies such as SVG that lend
> > themselves to templating to produce the graph display. This patch
> > makes use of a much simpler output representation than SVG in
> > order to maintain clarity.
>
> You're a little vague about the actual use case you're trying to
> satisfy. Are you actually trying to do SVG graphs in your custom
> theme, and looking for a better data structure from hg so you can do
> that through templating?
Yes. The theme in question can be seen in action here:
http://hgweb.boddie.org.uk/EventAggregator/graph
The problem with the existing graph action is that it takes something of a
shortcut with the data structures, making them unusable for the templating
system. Thus, it became necessary to extend the action to supply usable data,
and at that point I thought that the most acceptable patch was one which
still provided only one form of graph data, but also provided some conversion
so that people who had copy-pasted the vertex JavaScript code into their
theme could still rely on the old data structure format.
Paul
More information about the Mercurial-devel
mailing list