author | Benoit Allard <benoit@aeteurope.nl> |
Tue, 25 Nov 2008 22:32:11 +0100 | |
changeset 7408 | f031a12dfc31 |
parent 7345 | 55651328dfcc |
permissions | -rw-r--r-- |
6691 | 1 |
{header} |
2 |
<title>{repo|escape}: revision graph</title> |
|
3 |
<link rel="alternate" type="application/atom+xml" |
|
4 |
href="{url}atom-log" title="Atom feed for {repo|escape}: log"> |
|
5 |
<link rel="alternate" type="application/rss+xml" |
|
6 |
href="{url}rss-log" title="RSS feed for {repo|escape}: log"> |
|
7 |
<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]--> |
|
8 |
</head> |
|
9 |
<body> |
|
10 |
||
11 |
<div class="container"> |
|
12 |
<div class="menu"> |
|
13 |
<div class="logo"> |
|
14 |
<a href="http://www.selenic.com/mercurial/"> |
|
15 |
<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a> |
|
16 |
</div> |
|
17 |
<ul> |
|
6775
54ccf41761c9
coal: include current node in log, graph menu links
Brendan Cully <brendan@kublai.com>
parents:
6733
diff
changeset
|
18 |
<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li> |
6691 | 19 |
<li class="active">graph</li> |
20 |
<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li> |
|
21 |
</ul> |
|
22 |
<ul> |
|
23 |
<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li> |
|
24 |
<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li> |
|
25 |
</ul> |
|
26 |
</div> |
|
27 |
||
28 |
<div class="main"> |
|
7331
650e9d6988cb
Keep sessionvars with repository links added in a0843c82d1a2
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7327
diff
changeset
|
29 |
<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2> |
6691 | 30 |
<h3>graph</h3> |
31 |
||
32 |
<form class="search" action="{url}log"> |
|
33 |
{sessionvars%hiddenformentry} |
|
34 |
<p><input name="rev" id="search1" type="text" size="30"></p> |
|
7327
a1758089ee35
Kill trailing whitespace in templates
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7314
diff
changeset
|
35 |
<span>find changesets by author, revision, |
7299
288dda59233c
coal/paper: show a search tip when hovering over search box
Benoit Allard <benoit@aeteurope.nl>
parents:
7124
diff
changeset
|
36 |
files, or words in the commit message</span> |
6691 | 37 |
</form> |
38 |
||
39 |
<div class="navigate"> |
|
7345
55651328dfcc
hgweb: fix up the less/more links on the graph page
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7333
diff
changeset
|
40 |
<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> |
55651328dfcc
hgweb: fix up the less/more links on the graph page
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7333
diff
changeset
|
41 |
<a href="{url}graph/{rev}{morevars%urlparameter}">more</a> |
7333
ee12d9dc5cbb
hgweb: show revision number in the graph pagination
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7331
diff
changeset
|
42 |
| rev {rev}: {changenav%navgraphentry} |
6691 | 43 |
</div> |
44 |
||
7124
63579aa36c8e
graph: replace the blinking no javascript message
Benoit Allard <benoit@aeteurope.nl>
parents:
6905
diff
changeset
|
45 |
<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript> |
6691 | 46 |
|
47 |
<div id="wrapper"> |
|
48 |
<ul id="nodebgs"></ul> |
|
49 |
<canvas id="graph" width="224" height="{canvasheight}"></canvas> |
|
50 |
<ul id="graphnodes"></ul> |
|
51 |
</div> |
|
52 |
||
53 |
<script type="text/javascript" src="{staticurl}graph.js"></script> |
|
6905
248e54a9456e
coal/paper: make output well-formed and fix css syntax error breaking rendering
Rocco Rutte <pdmef@gmx.net>
parents:
6775
diff
changeset
|
54 |
<script type="text/javascript"> |
6729
855851eae70f
graph: improve script hiding tricks
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6728
diff
changeset
|
55 |
<!-- hide script content |
6691 | 56 |
|
6733
936a9073bb73
graph: fix JavaScript issues to make it work on IE
Benoit Allard <benoit@aeteurope.nl>
parents:
6729
diff
changeset
|
57 |
var data = {jsdata|json}; |
936a9073bb73
graph: fix JavaScript issues to make it work on IE
Benoit Allard <benoit@aeteurope.nl>
parents:
6729
diff
changeset
|
58 |
var graph = new Graph(); |
6691 | 59 |
graph.scale({bg_height}); |
60 |
||
61 |
graph.edge = function(x0, y0, x1, y1, color) { |
|
62 |
||
63 |
this.setColor(color, 0.0, 0.65); |
|
64 |
this.ctx.beginPath(); |
|
65 |
this.ctx.moveTo(x0, y0); |
|
66 |
this.ctx.lineTo(x1, y1); |
|
67 |
this.ctx.stroke(); |
|
68 |
||
69 |
} |
|
70 |
||
71 |
var revlink = '<li style="_STYLE"><span class="desc">'; |
|
72 |
revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
7408
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
73 |
revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>'; |
6691 | 74 |
|
75 |
graph.vertex = function(x, y, color, parity, cur) { |
|
76 |
||
77 |
this.ctx.beginPath(); |
|
78 |
color = this.setColor(color, 0.25, 0.75); |
|
79 |
this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
80 |
this.ctx.fill(); |
|
81 |
||
82 |
var bg = '<li class="bg parity' + parity + '"></li>'; |
|
83 |
var left = (this.columns + 1) * this.bg_height; |
|
84 |
var nstyle = 'padding-left: ' + left + 'px;'; |
|
85 |
var item = revlink.replace(/_STYLE/, nstyle); |
|
86 |
item = item.replace(/_PARITY/, 'parity' + parity); |
|
87 |
item = item.replace(/_NODEID/, cur[0]); |
|
88 |
item = item.replace(/_NODEID/, cur[0]); |
|
89 |
item = item.replace(/_DESC/, cur[3]); |
|
90 |
item = item.replace(/_USER/, cur[4]); |
|
91 |
item = item.replace(/_DATE/, cur[5]); |
|
7408
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
92 |
|
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
93 |
var tagspan = ''; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
94 |
if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
95 |
tagspan = '<span class="logtags">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
96 |
if (cur[6][1]) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
97 |
tagspan += '<span class="branchhead" title="' + cur[6][0] + '">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
98 |
tagspan += cur[6][0] + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
99 |
} else if (!cur[6][1] && cur[6][0] != 'default') { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
100 |
tagspan += '<span class="branchname" title="' + cur[6][0] + '">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
101 |
tagspan += cur[6][0] + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
102 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
103 |
if (cur[7].length) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
104 |
for (var t in cur[7]) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
105 |
var tag = cur[7][t]; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
106 |
tagspan += '<span class="tag">' + tag + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
107 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
108 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
109 |
tagspan += '</span>'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
110 |
} |
6728
84294e3710b8
graph: optimize rendering by appending all nodes at once
Augie Fackler <durin42@gmail.com>
parents:
6720
diff
changeset
|
111 |
|
7408
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7345
diff
changeset
|
112 |
item = item.replace(/_TAGS/, tagspan); |
6728
84294e3710b8
graph: optimize rendering by appending all nodes at once
Augie Fackler <durin42@gmail.com>
parents:
6720
diff
changeset
|
113 |
return [bg, item]; |
6691 | 114 |
|
115 |
} |
|
116 |
||
117 |
graph.render(data); |
|
6729
855851eae70f
graph: improve script hiding tricks
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6728
diff
changeset
|
118 |
|
855851eae70f
graph: improve script hiding tricks
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6728
diff
changeset
|
119 |
// stop hiding script --> |
6691 | 120 |
</script> |
121 |
||
122 |
<div class="navigate"> |
|
7345
55651328dfcc
hgweb: fix up the less/more links on the graph page
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7333
diff
changeset
|
123 |
<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> |
55651328dfcc
hgweb: fix up the less/more links on the graph page
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7333
diff
changeset
|
124 |
<a href="{url}graph/{rev}{morevars%urlparameter}">more</a> |
7333
ee12d9dc5cbb
hgweb: show revision number in the graph pagination
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7331
diff
changeset
|
125 |
| rev {rev}: {changenav%navgraphentry} |
6691 | 126 |
</div> |
127 |
||
128 |
</div> |
|
129 |
</div> |
|
130 |
||
131 |
{footer} |