Show More
@@ -1,123 +1,123 b'' | |||
|
1 | 1 | #header# |
|
2 |
<title>#repo|escape#: |
|
|
2 | <title>#repo|escape#: Graph</title> | |
|
3 | 3 | <link rel="alternate" type="application/atom+xml" |
|
4 | 4 | href="{url}atom-log" title="Atom feed for #repo|escape#"/> |
|
5 | 5 | <link rel="alternate" type="application/rss+xml" |
|
6 | 6 | href="{url}rss-log" title="RSS feed for #repo|escape#"/> |
|
7 | 7 | </head> |
|
8 | 8 | <body> |
|
9 | 9 | |
|
10 | 10 | <div class="page_header"> |
|
11 |
<a href="http://www.selenic.com/mercurial/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / |
|
|
11 | <a href="http://www.selenic.com/mercurial/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / graph | |
|
12 | 12 | </div> |
|
13 | 13 | |
|
14 | 14 | <form action="{url}log"> |
|
15 | 15 | {sessionvars%hiddenformentry} |
|
16 | 16 | <div class="search"> |
|
17 | 17 | <input type="text" name="rev" /> |
|
18 | 18 | </div> |
|
19 | 19 | </form> |
|
20 | 20 | <div class="page_nav"> |
|
21 | 21 | <a href="{url}summary{sessionvars%urlparameter}">summary</a> | |
|
22 | 22 | <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | |
|
23 | 23 | <a href="{url}log/#rev#{sessionvars%urlparameter}">changelog</a> | |
|
24 | 24 | graph | |
|
25 | 25 | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | |
|
26 | 26 | <a href="{url}file/#node|short#{sessionvars%urlparameter}">files</a> |
|
27 | 27 | <br/> |
|
28 | 28 | <a href="{url}graph/{uprev}{sessionvars%urlparameter}?revcount={revcountless}">less</a> |
|
29 | 29 | <a href="{url}graph/{uprev}{sessionvars%urlparameter}?revcount={revcountmore}">more</a> |
|
30 | 30 | | #changenav%navgraphentry#<br/> |
|
31 | 31 | </div> |
|
32 | 32 | |
|
33 | 33 | <div class="title"> </div> |
|
34 | 34 | |
|
35 | 35 | <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div> |
|
36 | 36 | |
|
37 | 37 | <div id="wrapper"> |
|
38 | 38 | <ul id="nodebgs"></ul> |
|
39 | 39 | <canvas id="graph" width="224" height="#canvasheight#"></canvas> |
|
40 | 40 | <ul id="graphnodes"></ul> |
|
41 | 41 | </div> |
|
42 | 42 | |
|
43 | 43 | <script type="text/javascript" src="#staticurl#graph.js"></script> |
|
44 | 44 | <script> |
|
45 | 45 | |
|
46 | 46 | document.getElementById('noscript').style.visibility = 'hidden'; |
|
47 | 47 | |
|
48 | 48 | data = {jsdata|json}; |
|
49 | 49 | graph = new Graph(); |
|
50 | 50 | graph.scale({bg_height}); |
|
51 | 51 | |
|
52 | 52 | graph.edge = function(x0, y0, x1, y1, color) { |
|
53 | 53 | |
|
54 | 54 | this.setColor(color, 0.0, 0.65); |
|
55 | 55 | this.ctx.beginPath(); |
|
56 | 56 | this.ctx.moveTo(x0, y0); |
|
57 | 57 | this.ctx.lineTo(x1, y1); |
|
58 | 58 | this.ctx.stroke(); |
|
59 | 59 | |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | var nodes = document.getElementById('graphnodes'); |
|
63 | 63 | var nodebgs = document.getElementById('nodebgs'); |
|
64 | 64 | |
|
65 | 65 | var revlink = '<li style="_STYLE"><span class="desc">'; |
|
66 | 66 | revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>'; |
|
67 | 67 | revlink += '</span> _TAGS'; |
|
68 | 68 | revlink += '<span class="info">_DATE ago, by _USER</span></li>'; |
|
69 | 69 | |
|
70 | 70 | graph.vertex = function(x, y, color, parity, cur) { |
|
71 | 71 | |
|
72 | 72 | this.ctx.beginPath(); |
|
73 | 73 | color = this.setColor(color, 0.25, 0.75); |
|
74 | 74 | this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
75 | 75 | this.ctx.fill(); |
|
76 | 76 | |
|
77 | 77 | var bg = '<li class="bg parity' + parity + '"></li>'; |
|
78 | 78 | nodebgs.innerHTML += bg; |
|
79 | 79 | |
|
80 | 80 | var left = (this.columns + 1) * this.bg_height; |
|
81 | 81 | var nstyle = 'padding-left: ' + left + 'px;'; |
|
82 | 82 | var item = revlink.replace(/_STYLE/, nstyle); |
|
83 | 83 | item = item.replace(/_PARITY/, 'parity' + parity); |
|
84 | 84 | item = item.replace(/_NODEID/, cur[0]); |
|
85 | 85 | item = item.replace(/_NODEID/, cur[0]); |
|
86 | 86 | item = item.replace(/_DESC/, cur[3]); |
|
87 | 87 | item = item.replace(/_USER/, cur[4]); |
|
88 | 88 | item = item.replace(/_DATE/, cur[5]); |
|
89 | 89 | |
|
90 | 90 | var tagspan = ''; |
|
91 | 91 | if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { |
|
92 | 92 | tagspan = '<span class="logtags">'; |
|
93 | 93 | if (cur[6][1]) { |
|
94 | 94 | tagspan += '<span class="branchtag" title="' + cur[6][0] + '">'; |
|
95 | 95 | tagspan += cur[6][0] + '</span> '; |
|
96 | 96 | } else if (!cur[6][1] && cur[6][0] != 'default') { |
|
97 | 97 | tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">'; |
|
98 | 98 | tagspan += cur[6][0] + '</span> '; |
|
99 | 99 | } |
|
100 | 100 | if (cur[7].length) { |
|
101 | 101 | for (var t in cur[7]) { |
|
102 | 102 | var tag = cur[7][t]; |
|
103 | 103 | tagspan += '<span class="tagtag">' + tag + '</span> '; |
|
104 | 104 | } |
|
105 | 105 | } |
|
106 | 106 | tagspan += '</span>'; |
|
107 | 107 | } |
|
108 | 108 | |
|
109 | 109 | item = item.replace(/_TAGS/, tagspan); |
|
110 | 110 | nodes.innerHTML += item; |
|
111 | 111 | |
|
112 | 112 | } |
|
113 | 113 | |
|
114 | 114 | graph.render(data); |
|
115 | 115 | </script> |
|
116 | 116 | |
|
117 | 117 | <div class="page_nav"> |
|
118 | 118 | <a href="{url}graph/{uprev}{sessionvars%urlparameter}?revcount={revcountless}">less</a> |
|
119 | 119 | <a href="{url}graph/{uprev}{sessionvars%urlparameter}?revcount={revcountmore}">more</a> |
|
120 | 120 | | {changenav%navgraphentry} |
|
121 | 121 | </div> |
|
122 | 122 | |
|
123 | 123 | #footer# |
General Comments 0
You need to be logged in to leave comments.
Login now