# HG changeset patch # User Steven Brown # Date 1307553579 -28800 # Node ID 81fc9678b018c928e2c5333b9055a66616db0531 # Parent fccd3b966da704c6d923bfa1d336d6c720e66800 paper, coal: define the diffstat templates The templates output the filename, the total number of changes to the file and a bar graph of the adds and removes. The filename is a link into the diff output. The diffstat is not yet displayed, but it can be manually added to the changeset page template. diff -r fccd3b966da7 -r 81fc9678b018 mercurial/templates/coal/map --- a/mercurial/templates/coal/map Thu Jun 09 01:15:49 2011 +0800 +++ b/mercurial/templates/coal/map Thu Jun 09 01:19:39 2011 +0800 @@ -23,6 +23,8 @@ filenodelink = '{file|escape} ' filenolink = '{file|escape} ' fileellipses = '...' +diffstatlink = ../paper/diffstat.tmpl +diffstatnolink = ../paper/diffstat.tmpl changelogentry = ../paper/shortlogentry.tmpl searchentry = ../paper/shortlogentry.tmpl changeset = ../paper/changeset.tmpl diff -r fccd3b966da7 -r 81fc9678b018 mercurial/templates/paper/diffstat.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/templates/paper/diffstat.tmpl Thu Jun 09 01:19:39 2011 +0800 @@ -0,0 +1,8 @@ + + {file|escape} + {total} + +   +   + + diff -r fccd3b966da7 -r 81fc9678b018 mercurial/templates/paper/map --- a/mercurial/templates/paper/map Thu Jun 09 01:15:49 2011 +0800 +++ b/mercurial/templates/paper/map Thu Jun 09 01:19:39 2011 +0800 @@ -22,6 +22,8 @@ filenodelink = '{file|escape} ' filenolink = '{file|escape} ' fileellipses = '...' +diffstatlink = diffstat.tmpl +diffstatnolink = diffstat.tmpl changelogentry = shortlogentry.tmpl searchentry = shortlogentry.tmpl changeset = changeset.tmpl diff -r fccd3b966da7 -r 81fc9678b018 mercurial/templates/static/style-coal.css --- a/mercurial/templates/static/style-coal.css Thu Jun 09 01:15:49 2011 +0800 +++ b/mercurial/templates/static/style-coal.css Thu Jun 09 01:19:39 2011 +0800 @@ -103,6 +103,26 @@ .minusline { color: #dc143c; } /* crimson */ .atline { color: purple; } +.diffstat-file { + white-space: nowrap; + font-size: 90%; +} +.diffstat-total { + white-space: nowrap; + font-size: 90%; +} +.diffstat-graph { + width: 100%; +} +.diffstat-add { + background-color: green; + float: left; +} +.diffstat-remove { + background-color: red; + float: left; +} + .navigate { text-align: right; font-size: 60%; diff -r fccd3b966da7 -r 81fc9678b018 mercurial/templates/static/style-paper.css --- a/mercurial/templates/static/style-paper.css Thu Jun 09 01:15:49 2011 +0800 +++ b/mercurial/templates/static/style-paper.css Thu Jun 09 01:19:39 2011 +0800 @@ -94,6 +94,26 @@ .minusline { color: #dc143c; } /* crimson */ .atline { color: purple; } +.diffstat-file { + white-space: nowrap; + font-size: 90%; +} +.diffstat-total { + white-space: nowrap; + font-size: 90%; +} +.diffstat-graph { + width: 100%; +} +.diffstat-add { + background-color: green; + float: left; +} +.diffstat-remove { + background-color: red; + float: left; +} + .navigate { text-align: right; font-size: 60%;