author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
Sun, 09 Nov 2008 12:15:32 +0100 | |
changeset 7349 | f711b8e0d2b3 |
parent 7345 | 55651328dfcc |
child 7408 | f031a12dfc31 |
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>'; |
|
73 |
revlink += '</span><span class="tag">_TAGS</span>'; |
|
74 |
revlink += '<span class="info">_DATE ago, by _USER</span></li>'; |
|
75 |
||
76 |
graph.vertex = function(x, y, color, parity, cur) { |
|
77 |
||
78 |
this.ctx.beginPath(); |
|
79 |
color = this.setColor(color, 0.25, 0.75); |
|
80 |
this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
81 |
this.ctx.fill(); |
|
82 |
||
83 |
var bg = '<li class="bg parity' + parity + '"></li>'; |
|
84 |
var left = (this.columns + 1) * this.bg_height; |
|
85 |
var nstyle = 'padding-left: ' + left + 'px;'; |
|
86 |
var item = revlink.replace(/_STYLE/, nstyle); |
|
87 |
item = item.replace(/_PARITY/, 'parity' + parity); |
|
88 |
item = item.replace(/_NODEID/, cur[0]); |
|
89 |
item = item.replace(/_NODEID/, cur[0]); |
|
90 |
item = item.replace(/_DESC/, cur[3]); |
|
91 |
item = item.replace(/_USER/, cur[4]); |
|
92 |
item = item.replace(/_DATE/, cur[5]); |
|
6720
084c9f1ef2bd
graph: display branch name alongside tags
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6701
diff
changeset
|
93 |
item = item.replace(/_TAGS/, cur[7].join(' ')); |
6728
84294e3710b8
graph: optimize rendering by appending all nodes at once
Augie Fackler <durin42@gmail.com>
parents:
6720
diff
changeset
|
94 |
|
84294e3710b8
graph: optimize rendering by appending all nodes at once
Augie Fackler <durin42@gmail.com>
parents:
6720
diff
changeset
|
95 |
return [bg, item]; |
6691 | 96 |
|
97 |
} |
|
98 |
||
99 |
graph.render(data); |
|
6729
855851eae70f
graph: improve script hiding tricks
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6728
diff
changeset
|
100 |
|
855851eae70f
graph: improve script hiding tricks
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6728
diff
changeset
|
101 |
// stop hiding script --> |
6691 | 102 |
</script> |
103 |
||
104 |
<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
|
105 |
<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
|
106 |
<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
|
107 |
| rev {rev}: {changenav%navgraphentry} |
6691 | 108 |
</div> |
109 |
||
110 |
</div> |
|
111 |
</div> |
|
112 |
||
113 |
{footer} |