sapling/mercurial/hgweb
Anton Shestakov 8859c1494a hgweb: use webutil.commonentry() for nodes (but not for jsdata yet) in /graph
This makes graphdata() simpler by using existing code that gets common
changeset properties for showing in hgweb. graphdata() is a nested function in
graph() that prepares entries for /graph view, but there are two different
lists of changesets prepared: "jsdata" for JavaScript-rendered graph and
"nodes" for everything else.

For "jsdata", properties "node", "user", "age" and "desc" are passed through
various template filters because we don't have these filters in JavaScript, so
the data has to be prepared server-side. But now that commonentry() is used for
producing "nodes" list (and it doesn't apply any filters), these filters need
to be added to the appropriate templates (only raw at this moment, everything
else either doesn't implement graph or uses JavaScript).

This is a bit of refactoring that will hopefully simplify future patches. The
end result is to have /graph that only renders the actual graph with nodes and
vertices in JavaScript, and the rest is done server-side. This way server-side
code can focus on showing a list of changesets, which is easy because we
already have /log, /shortlog, etc, and JavaScript code can be simplified,
making it easier to add obsolescence graph and other features.
2017-11-20 21:59:00 +08:00
..
__init__.py hgweb: rewrite most obviously-native-strings to be native strings 2017-10-14 15:42:38 -04:00
common.py config: rename allow_push to allow-push 2017-10-19 11:46:41 +02:00
hgweb_mod.py config: rename allowpull to allow-pull 2017-10-19 11:43:19 +02:00
hgwebdir_mod.py hgweb: use native strings consistently for querystring parsing 2017-10-05 14:48:52 -04:00
protocol.py hgweb: fix decodevaluefromheaders to always return a bytes value 2017-10-15 00:43:01 -04:00
request.py hgweb: fill in content-type and content-length as native strings 2017-10-14 11:20:31 -04:00
server.py hgweb: more "http headers are native strs" cleanup 2017-10-15 00:38:33 -04:00
webcommands.py hgweb: use webutil.commonentry() for nodes (but not for jsdata yet) in /graph 2017-11-20 21:59:00 +08:00
webutil.py context: add instabilities() method to basefilectx 2017-11-19 13:18:54 +08:00
wsgicgi.py hgweb: when constructing or adding to a wsgi environ dict, use native strs 2017-10-05 14:22:02 -04:00