mercurial/templates/raw/map
author Paul Boddie <paul@boddie.org.uk>
Mon, 21 May 2012 00:20:05 +0200
changeset 16773 d490edc71146
parent 13921 4788923a2b33
child 17277 323de4f49bd1
permissions -rw-r--r--
hgweb: make graph data suitable for template usage Previously, graph data has been encoded for processing done by JavaScript code run in the browser, employing simple structures with implicit member positions. This patch modifies the graph command to also produce data employing a dictionary-based structure suitable for use with the templating mechanism, thus permitting other ways of presenting repository graphs using that mechanism. 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.

mimetype = 'text/plain; charset={encoding}'
header = ''
footer = ''
changeset = changeset.tmpl
difflineplus = '{line}'
difflineminus = '{line}'
difflineat = '{line}'
diffline = '{line}'
changesetparent = '# Parent  {node}'
changesetchild = '# Child   {node}'
filenodelink = ''
filenolink = ''
fileline = '{line}'
diffblock = '{lines}'
filediff = filediff.tmpl
fileannotate = fileannotate.tmpl
annotateline = '{author|user}@{rev}: {line}'
manifest = manifest.tmpl
direntry = 'drwxr-xr-x {basename}\n'
fileentry = '{permissions|permissions} {size} {basename}\n'
index = index.tmpl
notfound = notfound.tmpl
error = error.tmpl
indexentry = '{url}\n'
tags = '{entries%tagentry}'
tagentry = '{tag}	{node}\n'
bookmarks = '{entries%bookmarkentry}'
bookmarkentry = '{bookmark}	{node}\n'
branches = '{entries%branchentry}'
branchentry = '{branch}	{node}	{status}\n'
graph = graph.tmpl
graphnode = graphnode.tmpl
graphedge = graphedge.tmpl
bookmarkname = 'bookmark:    {name}\n'
branchname = 'branch:      {name}\n'
tagname = 'tag:         {name}\n'