##// END OF EJS Templates
hgweb: make stripes in graph with CSS
Alexander Plavin -
r19453:ece3b329 default
parent child Browse files
Show More
@@ -1,129 +1,129
1 {header}
1 {header}
2 <title>{repo|escape}: revision graph</title>
2 <title>{repo|escape}: revision graph</title>
3 <link rel="alternate" type="application/atom+xml"
3 <link rel="alternate" type="application/atom+xml"
4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}: log" />
4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}: log" />
5 <link rel="alternate" type="application/rss+xml"
5 <link rel="alternate" type="application/rss+xml"
6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}: log" />
6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}: log" />
7 <!--[if IE]><script type="text/javascript" src="{staticurl|urlescape}excanvas.js"></script><![endif]-->
7 <!--[if IE]><script type="text/javascript" src="{staticurl|urlescape}excanvas.js"></script><![endif]-->
8 </head>
8 </head>
9 <body>
9 <body>
10
10
11 <div class="container">
11 <div class="container">
12 <div class="menu">
12 <div class="menu">
13 <div class="logo">
13 <div class="logo">
14 <a href="{logourl}">
14 <a href="{logourl}">
15 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
15 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
16 </div>
16 </div>
17 <ul>
17 <ul>
18 <li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
18 <li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
19 <li class="active">graph</li>
19 <li class="active">graph</li>
20 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
20 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
21 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
21 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
22 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
22 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
23 </ul>
23 </ul>
24 <ul>
24 <ul>
25 <li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
25 <li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
26 <li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
26 <li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
27 </ul>
27 </ul>
28 <ul>
28 <ul>
29 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
29 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
30 </ul>
30 </ul>
31 <p>
31 <p>
32 <div class="atom-logo">
32 <div class="atom-logo">
33 <a href="{url|urlescape}atom-log" title="subscribe to atom feed">
33 <a href="{url|urlescape}atom-log" title="subscribe to atom feed">
34 <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed">
34 <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed">
35 </a>
35 </a>
36 </div>
36 </div>
37 </div>
37 </div>
38
38
39 <div class="main">
39 <div class="main">
40 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
40 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
41 <h3>graph</h3>
41 <h3>graph</h3>
42
42
43 <form class="search" action="{url|urlescape}log">
43 <form class="search" action="{url|urlescape}log">
44 {sessionvars%hiddenformentry}
44 {sessionvars%hiddenformentry}
45 <p><input name="rev" id="search1" type="text" size="30" /></p>
45 <p><input name="rev" id="search1" type="text" size="30" /></p>
46 <div id="hint">find changesets by author, revision,
46 <div id="hint">find changesets by author, revision,
47 files, or words in the commit message</div>
47 files, or words in the commit message</div>
48 </form>
48 </form>
49
49
50 <div class="navigate">
50 <div class="navigate">
51 <a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
51 <a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
52 <a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
52 <a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
53 | rev {rev}: {changenav%navgraph}
53 | rev {rev}: {changenav%navgraph}
54 </div>
54 </div>
55
55
56 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
56 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
57
57
58 <div id="wrapper">
58 <div id="wrapper">
59 <ul id="nodebgs"></ul>
59 <ul id="nodebgs" class="stripes2"></ul>
60 <canvas id="graph" width="480" height="{canvasheight}"></canvas>
60 <canvas id="graph" width="480" height="{canvasheight}"></canvas>
61 <ul id="graphnodes"></ul>
61 <ul id="graphnodes"></ul>
62 </div>
62 </div>
63
63
64 <script type="text/javascript">
64 <script type="text/javascript">
65 <!-- hide script content
65 <!-- hide script content
66
66
67 var data = {jsdata|json};
67 var data = {jsdata|json};
68 var graph = new Graph();
68 var graph = new Graph();
69 graph.scale({bg_height});
69 graph.scale({bg_height});
70
70
71 graph.vertex = function(x, y, color, parity, cur) \{
71 graph.vertex = function(x, y, color, parity, cur) \{
72
72
73 this.ctx.beginPath();
73 this.ctx.beginPath();
74 color = this.setColor(color, 0.25, 0.75);
74 color = this.setColor(color, 0.25, 0.75);
75 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
75 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
76 this.ctx.fill();
76 this.ctx.fill();
77
77
78 var bg = '<li class="bg parity' + parity + '"></li>';
78 var bg = '<li class="bg"></li>';
79 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
79 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
80 var nstyle = 'padding-left: ' + left + 'px;';
80 var nstyle = 'padding-left: ' + left + 'px;';
81
81
82 var tagspan = '';
82 var tagspan = '';
83 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
83 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
84 tagspan = '<span class="logtags">';
84 tagspan = '<span class="logtags">';
85 if (cur[6][1]) \{
85 if (cur[6][1]) \{
86 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
86 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
87 tagspan += cur[6][0] + '</span> ';
87 tagspan += cur[6][0] + '</span> ';
88 } else if (!cur[6][1] && cur[6][0] != 'default') \{
88 } else if (!cur[6][1] && cur[6][0] != 'default') \{
89 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
89 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
90 tagspan += cur[6][0] + '</span> ';
90 tagspan += cur[6][0] + '</span> ';
91 }
91 }
92 if (cur[7].length) \{
92 if (cur[7].length) \{
93 for (var t in cur[7]) \{
93 for (var t in cur[7]) \{
94 var tag = cur[7][t];
94 var tag = cur[7][t];
95 tagspan += '<span class="tag">' + tag + '</span> ';
95 tagspan += '<span class="tag">' + tag + '</span> ';
96 }
96 }
97 }
97 }
98 if (cur[8].length) \{
98 if (cur[8].length) \{
99 for (var b in cur[8]) \{
99 for (var b in cur[8]) \{
100 var bookmark = cur[8][b];
100 var bookmark = cur[8][b];
101 tagspan += '<span class="tag">' + bookmark + '</span> ';
101 tagspan += '<span class="tag">' + bookmark + '</span> ';
102 }
102 }
103 }
103 }
104 tagspan += '</span>';
104 tagspan += '</span>';
105 }
105 }
106
106
107 var item = '<li style="' + nstyle + '"><span class="desc">';
107 var item = '<li style="' + nstyle + '"><span class="desc">';
108 item += '<a href="{url|urlescape}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
108 item += '<a href="{url|urlescape}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
109 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
109 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
110
110
111 return [bg, item];
111 return [bg, item];
112
112
113 }
113 }
114
114
115 graph.render(data);
115 graph.render(data);
116
116
117 // stop hiding script -->
117 // stop hiding script -->
118 </script>
118 </script>
119
119
120 <div class="navigate">
120 <div class="navigate">
121 <a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
121 <a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
122 <a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
122 <a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
123 | rev {rev}: {changenav%navgraph}
123 | rev {rev}: {changenav%navgraph}
124 </div>
124 </div>
125
125
126 </div>
126 </div>
127 </div>
127 </div>
128
128
129 {footer}
129 {footer}
@@ -1,417 +1,417
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" serve || exit 80
2
2
3 Some tests for hgweb in an empty repository
3 Some tests for hgweb in an empty repository
4
4
5 $ hg init test
5 $ hg init test
6 $ cd test
6 $ cd test
7 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
7 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
8 $ cat hg.pid >> $DAEMON_PIDS
8 $ cat hg.pid >> $DAEMON_PIDS
9 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'shortlog')
9 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'shortlog')
10 200 Script output follows
10 200 Script output follows
11
11
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
13 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
13 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
14 <head>
14 <head>
15 <link rel="icon" href="/static/hgicon.png" type="image/png" />
15 <link rel="icon" href="/static/hgicon.png" type="image/png" />
16 <meta name="robots" content="index, nofollow" />
16 <meta name="robots" content="index, nofollow" />
17 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
17 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
18 <script type="text/javascript" src="/static/mercurial.js"></script>
18 <script type="text/javascript" src="/static/mercurial.js"></script>
19
19
20 <title>test: log</title>
20 <title>test: log</title>
21 <link rel="alternate" type="application/atom+xml"
21 <link rel="alternate" type="application/atom+xml"
22 href="/atom-log" title="Atom feed for test" />
22 href="/atom-log" title="Atom feed for test" />
23 <link rel="alternate" type="application/rss+xml"
23 <link rel="alternate" type="application/rss+xml"
24 href="/rss-log" title="RSS feed for test" />
24 href="/rss-log" title="RSS feed for test" />
25 </head>
25 </head>
26 <body>
26 <body>
27
27
28 <div class="container">
28 <div class="container">
29 <div class="menu">
29 <div class="menu">
30 <div class="logo">
30 <div class="logo">
31 <a href="http://mercurial.selenic.com/">
31 <a href="http://mercurial.selenic.com/">
32 <img src="/static/hglogo.png" alt="mercurial" /></a>
32 <img src="/static/hglogo.png" alt="mercurial" /></a>
33 </div>
33 </div>
34 <ul>
34 <ul>
35 <li class="active">log</li>
35 <li class="active">log</li>
36 <li><a href="/graph/000000000000">graph</a></li>
36 <li><a href="/graph/000000000000">graph</a></li>
37 <li><a href="/tags">tags</a></li>
37 <li><a href="/tags">tags</a></li>
38 <li><a href="/bookmarks">bookmarks</a></li>
38 <li><a href="/bookmarks">bookmarks</a></li>
39 <li><a href="/branches">branches</a></li>
39 <li><a href="/branches">branches</a></li>
40 </ul>
40 </ul>
41 <ul>
41 <ul>
42 <li><a href="/rev/000000000000">changeset</a></li>
42 <li><a href="/rev/000000000000">changeset</a></li>
43 <li><a href="/file/000000000000">browse</a></li>
43 <li><a href="/file/000000000000">browse</a></li>
44 </ul>
44 </ul>
45 <ul>
45 <ul>
46
46
47 </ul>
47 </ul>
48 <ul>
48 <ul>
49 <li><a href="/help">help</a></li>
49 <li><a href="/help">help</a></li>
50 </ul>
50 </ul>
51 <p>
51 <p>
52 <div class="atom-logo">
52 <div class="atom-logo">
53 <a href="/atom-log" title="subscribe to atom feed">
53 <a href="/atom-log" title="subscribe to atom feed">
54 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
54 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
55 </a>
55 </a>
56 </div>
56 </div>
57 </div>
57 </div>
58
58
59 <div class="main">
59 <div class="main">
60 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
60 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
61 <h3>log</h3>
61 <h3>log</h3>
62
62
63 <form class="search" action="/log">
63 <form class="search" action="/log">
64
64
65 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
65 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
66 <div id="hint">find changesets by author, revision,
66 <div id="hint">find changesets by author, revision,
67 files, or words in the commit message</div>
67 files, or words in the commit message</div>
68 </form>
68 </form>
69
69
70 <div class="navigate">
70 <div class="navigate">
71 <a href="/shortlog/-1?revcount=30">less</a>
71 <a href="/shortlog/-1?revcount=30">less</a>
72 <a href="/shortlog/-1?revcount=120">more</a>
72 <a href="/shortlog/-1?revcount=120">more</a>
73 | rev -1:
73 | rev -1:
74 </div>
74 </div>
75
75
76 <table class="bigtable">
76 <table class="bigtable">
77 <tr>
77 <tr>
78 <th class="age">age</th>
78 <th class="age">age</th>
79 <th class="author">author</th>
79 <th class="author">author</th>
80 <th class="description">description</th>
80 <th class="description">description</th>
81 </tr>
81 </tr>
82 <tbody class="stripes2">
82 <tbody class="stripes2">
83
83
84 </tbody>
84 </tbody>
85 </table>
85 </table>
86
86
87 <div class="navigate">
87 <div class="navigate">
88 <a href="/shortlog/-1?revcount=30">less</a>
88 <a href="/shortlog/-1?revcount=30">less</a>
89 <a href="/shortlog/-1?revcount=120">more</a>
89 <a href="/shortlog/-1?revcount=120">more</a>
90 | rev -1:
90 | rev -1:
91 </div>
91 </div>
92
92
93 </div>
93 </div>
94 </div>
94 </div>
95
95
96 <script type="text/javascript">process_dates()</script>
96 <script type="text/javascript">process_dates()</script>
97
97
98
98
99 </body>
99 </body>
100 </html>
100 </html>
101
101
102 $ echo babar
102 $ echo babar
103 babar
103 babar
104 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
104 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
105 200 Script output follows
105 200 Script output follows
106
106
107 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
107 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
108 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
108 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
109 <head>
109 <head>
110 <link rel="icon" href="/static/hgicon.png" type="image/png" />
110 <link rel="icon" href="/static/hgicon.png" type="image/png" />
111 <meta name="robots" content="index, nofollow" />
111 <meta name="robots" content="index, nofollow" />
112 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
112 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
113 <script type="text/javascript" src="/static/mercurial.js"></script>
113 <script type="text/javascript" src="/static/mercurial.js"></script>
114
114
115 <title>test: log</title>
115 <title>test: log</title>
116 <link rel="alternate" type="application/atom+xml"
116 <link rel="alternate" type="application/atom+xml"
117 href="/atom-log" title="Atom feed for test" />
117 href="/atom-log" title="Atom feed for test" />
118 <link rel="alternate" type="application/rss+xml"
118 <link rel="alternate" type="application/rss+xml"
119 href="/rss-log" title="RSS feed for test" />
119 href="/rss-log" title="RSS feed for test" />
120 </head>
120 </head>
121 <body>
121 <body>
122
122
123 <div class="container">
123 <div class="container">
124 <div class="menu">
124 <div class="menu">
125 <div class="logo">
125 <div class="logo">
126 <a href="http://mercurial.selenic.com/">
126 <a href="http://mercurial.selenic.com/">
127 <img src="/static/hglogo.png" alt="mercurial" /></a>
127 <img src="/static/hglogo.png" alt="mercurial" /></a>
128 </div>
128 </div>
129 <ul>
129 <ul>
130 <li class="active">log</li>
130 <li class="active">log</li>
131 <li><a href="/graph/000000000000">graph</a></li>
131 <li><a href="/graph/000000000000">graph</a></li>
132 <li><a href="/tags">tags</a></li>
132 <li><a href="/tags">tags</a></li>
133 <li><a href="/bookmarks">bookmarks</a></li>
133 <li><a href="/bookmarks">bookmarks</a></li>
134 <li><a href="/branches">branches</a></li>
134 <li><a href="/branches">branches</a></li>
135 </ul>
135 </ul>
136 <ul>
136 <ul>
137 <li><a href="/rev/000000000000">changeset</a></li>
137 <li><a href="/rev/000000000000">changeset</a></li>
138 <li><a href="/file/000000000000">browse</a></li>
138 <li><a href="/file/000000000000">browse</a></li>
139 </ul>
139 </ul>
140 <ul>
140 <ul>
141
141
142 </ul>
142 </ul>
143 <ul>
143 <ul>
144 <li><a href="/help">help</a></li>
144 <li><a href="/help">help</a></li>
145 </ul>
145 </ul>
146 <p>
146 <p>
147 <div class="atom-logo">
147 <div class="atom-logo">
148 <a href="/atom-log" title="subscribe to atom feed">
148 <a href="/atom-log" title="subscribe to atom feed">
149 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
149 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
150 </a>
150 </a>
151 </div>
151 </div>
152 </div>
152 </div>
153
153
154 <div class="main">
154 <div class="main">
155 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
155 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
156 <h3>log</h3>
156 <h3>log</h3>
157
157
158 <form class="search" action="/log">
158 <form class="search" action="/log">
159
159
160 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
160 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
161 <div id="hint">find changesets by author, revision,
161 <div id="hint">find changesets by author, revision,
162 files, or words in the commit message</div>
162 files, or words in the commit message</div>
163 </form>
163 </form>
164
164
165 <div class="navigate">
165 <div class="navigate">
166 <a href="/shortlog/-1?revcount=5">less</a>
166 <a href="/shortlog/-1?revcount=5">less</a>
167 <a href="/shortlog/-1?revcount=20">more</a>
167 <a href="/shortlog/-1?revcount=20">more</a>
168 | rev -1:
168 | rev -1:
169 </div>
169 </div>
170
170
171 <table class="bigtable">
171 <table class="bigtable">
172 <tr>
172 <tr>
173 <th class="age">age</th>
173 <th class="age">age</th>
174 <th class="author">author</th>
174 <th class="author">author</th>
175 <th class="description">description</th>
175 <th class="description">description</th>
176 </tr>
176 </tr>
177 <tbody class="stripes2">
177 <tbody class="stripes2">
178
178
179 </tbody>
179 </tbody>
180 </table>
180 </table>
181
181
182 <div class="navigate">
182 <div class="navigate">
183 <a href="/shortlog/-1?revcount=5">less</a>
183 <a href="/shortlog/-1?revcount=5">less</a>
184 <a href="/shortlog/-1?revcount=20">more</a>
184 <a href="/shortlog/-1?revcount=20">more</a>
185 | rev -1:
185 | rev -1:
186 </div>
186 </div>
187
187
188 </div>
188 </div>
189 </div>
189 </div>
190
190
191 <script type="text/javascript">process_dates()</script>
191 <script type="text/javascript">process_dates()</script>
192
192
193
193
194 </body>
194 </body>
195 </html>
195 </html>
196
196
197 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph')
197 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph')
198 200 Script output follows
198 200 Script output follows
199
199
200 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
200 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
201 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
201 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
202 <head>
202 <head>
203 <link rel="icon" href="/static/hgicon.png" type="image/png" />
203 <link rel="icon" href="/static/hgicon.png" type="image/png" />
204 <meta name="robots" content="index, nofollow" />
204 <meta name="robots" content="index, nofollow" />
205 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
205 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
206 <script type="text/javascript" src="/static/mercurial.js"></script>
206 <script type="text/javascript" src="/static/mercurial.js"></script>
207
207
208 <title>test: revision graph</title>
208 <title>test: revision graph</title>
209 <link rel="alternate" type="application/atom+xml"
209 <link rel="alternate" type="application/atom+xml"
210 href="/atom-log" title="Atom feed for test: log" />
210 href="/atom-log" title="Atom feed for test: log" />
211 <link rel="alternate" type="application/rss+xml"
211 <link rel="alternate" type="application/rss+xml"
212 href="/rss-log" title="RSS feed for test: log" />
212 href="/rss-log" title="RSS feed for test: log" />
213 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
213 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
214 </head>
214 </head>
215 <body>
215 <body>
216
216
217 <div class="container">
217 <div class="container">
218 <div class="menu">
218 <div class="menu">
219 <div class="logo">
219 <div class="logo">
220 <a href="http://mercurial.selenic.com/">
220 <a href="http://mercurial.selenic.com/">
221 <img src="/static/hglogo.png" alt="mercurial" /></a>
221 <img src="/static/hglogo.png" alt="mercurial" /></a>
222 </div>
222 </div>
223 <ul>
223 <ul>
224 <li><a href="/shortlog/000000000000">log</a></li>
224 <li><a href="/shortlog/000000000000">log</a></li>
225 <li class="active">graph</li>
225 <li class="active">graph</li>
226 <li><a href="/tags">tags</a></li>
226 <li><a href="/tags">tags</a></li>
227 <li><a href="/bookmarks">bookmarks</a></li>
227 <li><a href="/bookmarks">bookmarks</a></li>
228 <li><a href="/branches">branches</a></li>
228 <li><a href="/branches">branches</a></li>
229 </ul>
229 </ul>
230 <ul>
230 <ul>
231 <li><a href="/rev/000000000000">changeset</a></li>
231 <li><a href="/rev/000000000000">changeset</a></li>
232 <li><a href="/file/000000000000">browse</a></li>
232 <li><a href="/file/000000000000">browse</a></li>
233 </ul>
233 </ul>
234 <ul>
234 <ul>
235 <li><a href="/help">help</a></li>
235 <li><a href="/help">help</a></li>
236 </ul>
236 </ul>
237 <p>
237 <p>
238 <div class="atom-logo">
238 <div class="atom-logo">
239 <a href="/atom-log" title="subscribe to atom feed">
239 <a href="/atom-log" title="subscribe to atom feed">
240 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
240 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
241 </a>
241 </a>
242 </div>
242 </div>
243 </div>
243 </div>
244
244
245 <div class="main">
245 <div class="main">
246 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
246 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
247 <h3>graph</h3>
247 <h3>graph</h3>
248
248
249 <form class="search" action="/log">
249 <form class="search" action="/log">
250
250
251 <p><input name="rev" id="search1" type="text" size="30" /></p>
251 <p><input name="rev" id="search1" type="text" size="30" /></p>
252 <div id="hint">find changesets by author, revision,
252 <div id="hint">find changesets by author, revision,
253 files, or words in the commit message</div>
253 files, or words in the commit message</div>
254 </form>
254 </form>
255
255
256 <div class="navigate">
256 <div class="navigate">
257 <a href="/graph/-1?revcount=30">less</a>
257 <a href="/graph/-1?revcount=30">less</a>
258 <a href="/graph/-1?revcount=120">more</a>
258 <a href="/graph/-1?revcount=120">more</a>
259 | rev -1:
259 | rev -1:
260 </div>
260 </div>
261
261
262 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
262 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
263
263
264 <div id="wrapper">
264 <div id="wrapper">
265 <ul id="nodebgs"></ul>
265 <ul id="nodebgs" class="stripes2"></ul>
266 <canvas id="graph" width="480" height="12"></canvas>
266 <canvas id="graph" width="480" height="12"></canvas>
267 <ul id="graphnodes"></ul>
267 <ul id="graphnodes"></ul>
268 </div>
268 </div>
269
269
270 <script type="text/javascript">
270 <script type="text/javascript">
271 <!-- hide script content
271 <!-- hide script content
272
272
273 var data = [];
273 var data = [];
274 var graph = new Graph();
274 var graph = new Graph();
275 graph.scale(39);
275 graph.scale(39);
276
276
277 graph.vertex = function(x, y, color, parity, cur) {
277 graph.vertex = function(x, y, color, parity, cur) {
278
278
279 this.ctx.beginPath();
279 this.ctx.beginPath();
280 color = this.setColor(color, 0.25, 0.75);
280 color = this.setColor(color, 0.25, 0.75);
281 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
281 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
282 this.ctx.fill();
282 this.ctx.fill();
283
283
284 var bg = '<li class="bg parity' + parity + '"></li>';
284 var bg = '<li class="bg"></li>';
285 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
285 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
286 var nstyle = 'padding-left: ' + left + 'px;';
286 var nstyle = 'padding-left: ' + left + 'px;';
287
287
288 var tagspan = '';
288 var tagspan = '';
289 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
289 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
290 tagspan = '<span class="logtags">';
290 tagspan = '<span class="logtags">';
291 if (cur[6][1]) {
291 if (cur[6][1]) {
292 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
292 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
293 tagspan += cur[6][0] + '</span> ';
293 tagspan += cur[6][0] + '</span> ';
294 } else if (!cur[6][1] && cur[6][0] != 'default') {
294 } else if (!cur[6][1] && cur[6][0] != 'default') {
295 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
295 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
296 tagspan += cur[6][0] + '</span> ';
296 tagspan += cur[6][0] + '</span> ';
297 }
297 }
298 if (cur[7].length) {
298 if (cur[7].length) {
299 for (var t in cur[7]) {
299 for (var t in cur[7]) {
300 var tag = cur[7][t];
300 var tag = cur[7][t];
301 tagspan += '<span class="tag">' + tag + '</span> ';
301 tagspan += '<span class="tag">' + tag + '</span> ';
302 }
302 }
303 }
303 }
304 if (cur[8].length) {
304 if (cur[8].length) {
305 for (var b in cur[8]) {
305 for (var b in cur[8]) {
306 var bookmark = cur[8][b];
306 var bookmark = cur[8][b];
307 tagspan += '<span class="tag">' + bookmark + '</span> ';
307 tagspan += '<span class="tag">' + bookmark + '</span> ';
308 }
308 }
309 }
309 }
310 tagspan += '</span>';
310 tagspan += '</span>';
311 }
311 }
312
312
313 var item = '<li style="' + nstyle + '"><span class="desc">';
313 var item = '<li style="' + nstyle + '"><span class="desc">';
314 item += '<a href="/rev/' + cur[0] + '" title="' + cur[0] + '">' + cur[3] + '</a>';
314 item += '<a href="/rev/' + cur[0] + '" title="' + cur[0] + '">' + cur[3] + '</a>';
315 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
315 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
316
316
317 return [bg, item];
317 return [bg, item];
318
318
319 }
319 }
320
320
321 graph.render(data);
321 graph.render(data);
322
322
323 // stop hiding script -->
323 // stop hiding script -->
324 </script>
324 </script>
325
325
326 <div class="navigate">
326 <div class="navigate">
327 <a href="/graph/-1?revcount=30">less</a>
327 <a href="/graph/-1?revcount=30">less</a>
328 <a href="/graph/-1?revcount=120">more</a>
328 <a href="/graph/-1?revcount=120">more</a>
329 | rev -1:
329 | rev -1:
330 </div>
330 </div>
331
331
332 </div>
332 </div>
333 </div>
333 </div>
334
334
335 <script type="text/javascript">process_dates()</script>
335 <script type="text/javascript">process_dates()</script>
336
336
337
337
338 </body>
338 </body>
339 </html>
339 </html>
340
340
341 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file')
341 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file')
342 200 Script output follows
342 200 Script output follows
343
343
344 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
344 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
345 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
345 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
346 <head>
346 <head>
347 <link rel="icon" href="/static/hgicon.png" type="image/png" />
347 <link rel="icon" href="/static/hgicon.png" type="image/png" />
348 <meta name="robots" content="index, nofollow" />
348 <meta name="robots" content="index, nofollow" />
349 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
349 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
350 <script type="text/javascript" src="/static/mercurial.js"></script>
350 <script type="text/javascript" src="/static/mercurial.js"></script>
351
351
352 <title>test: 000000000000 /</title>
352 <title>test: 000000000000 /</title>
353 </head>
353 </head>
354 <body>
354 <body>
355
355
356 <div class="container">
356 <div class="container">
357 <div class="menu">
357 <div class="menu">
358 <div class="logo">
358 <div class="logo">
359 <a href="http://mercurial.selenic.com/">
359 <a href="http://mercurial.selenic.com/">
360 <img src="/static/hglogo.png" alt="mercurial" /></a>
360 <img src="/static/hglogo.png" alt="mercurial" /></a>
361 </div>
361 </div>
362 <ul>
362 <ul>
363 <li><a href="/shortlog/000000000000">log</a></li>
363 <li><a href="/shortlog/000000000000">log</a></li>
364 <li><a href="/graph/000000000000">graph</a></li>
364 <li><a href="/graph/000000000000">graph</a></li>
365 <li><a href="/tags">tags</a></li>
365 <li><a href="/tags">tags</a></li>
366 <li><a href="/bookmarks">bookmarks</a></li>
366 <li><a href="/bookmarks">bookmarks</a></li>
367 <li><a href="/branches">branches</a></li>
367 <li><a href="/branches">branches</a></li>
368 </ul>
368 </ul>
369 <ul>
369 <ul>
370 <li><a href="/rev/000000000000">changeset</a></li>
370 <li><a href="/rev/000000000000">changeset</a></li>
371 <li class="active">browse</li>
371 <li class="active">browse</li>
372 </ul>
372 </ul>
373 <ul>
373 <ul>
374
374
375 </ul>
375 </ul>
376 <ul>
376 <ul>
377 <li><a href="/help">help</a></li>
377 <li><a href="/help">help</a></li>
378 </ul>
378 </ul>
379 </div>
379 </div>
380
380
381 <div class="main">
381 <div class="main">
382 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
382 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
383 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
383 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
384
384
385 <form class="search" action="/log">
385 <form class="search" action="/log">
386
386
387 <p><input name="rev" id="search1" type="text" size="30" /></p>
387 <p><input name="rev" id="search1" type="text" size="30" /></p>
388 <div id="hint">find changesets by author, revision,
388 <div id="hint">find changesets by author, revision,
389 files, or words in the commit message</div>
389 files, or words in the commit message</div>
390 </form>
390 </form>
391
391
392 <table class="bigtable">
392 <table class="bigtable">
393 <tr>
393 <tr>
394 <th class="name">name</th>
394 <th class="name">name</th>
395 <th class="size">size</th>
395 <th class="size">size</th>
396 <th class="permissions">permissions</th>
396 <th class="permissions">permissions</th>
397 </tr>
397 </tr>
398 <tbody class="stripes2">
398 <tbody class="stripes2">
399 <tr class="fileline">
399 <tr class="fileline">
400 <td class="name"><a href="/file/000000000000/">[up]</a></td>
400 <td class="name"><a href="/file/000000000000/">[up]</a></td>
401 <td class="size"></td>
401 <td class="size"></td>
402 <td class="permissions">drwxr-xr-x</td>
402 <td class="permissions">drwxr-xr-x</td>
403 </tr>
403 </tr>
404
404
405
405
406 </tbody>
406 </tbody>
407 </table>
407 </table>
408 </div>
408 </div>
409 </div>
409 </div>
410 <script type="text/javascript">process_dates()</script>
410 <script type="text/javascript">process_dates()</script>
411
411
412
412
413 </body>
413 </body>
414 </html>
414 </html>
415
415
416
416
417 $ cd ..
417 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now