##// END OF EJS Templates
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin -
r19783:1c2a309b default
parent child Browse files
Show More
@@ -1,129 +1,140 b''
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" class="stripes2"></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"></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 <script type="text/javascript">
127 ajaxScrollInit(
128 '{url|urlescape}graph/{rev}?revcount=%next%',
129 {revcount}+60,
130 function (htmlText, previousVal) \{ return previousVal + 60; },
131 '#wrapper',
132 '<div class="%class%" style="text-align: center;">%text%</div>',
133 'graph'
134 );
135 </script>
136
126 </div>
137 </div>
127 </div>
138 </div>
128
139
129 {footer}
140 {footer}
@@ -1,447 +1,458 b''
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 <script type="text/javascript">
93 <script type="text/javascript">
94 ajaxScrollInit(
94 ajaxScrollInit(
95 '/shortlog/%next%',
95 '/shortlog/%next%',
96 '', <!-- NEXTHASH
96 '', <!-- NEXTHASH
97 function (htmlText, previousVal) {
97 function (htmlText, previousVal) {
98 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
98 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
99 return m ? m[1] : null;
99 return m ? m[1] : null;
100 },
100 },
101 '.bigtable > tbody:nth-of-type(2)',
101 '.bigtable > tbody:nth-of-type(2)',
102 '<tr class="%class%">\
102 '<tr class="%class%">\
103 <td colspan="3" style="text-align: center;">%text%</td>\
103 <td colspan="3" style="text-align: center;">%text%</td>\
104 </tr>'
104 </tr>'
105 );
105 );
106 </script>
106 </script>
107
107
108 </div>
108 </div>
109 </div>
109 </div>
110
110
111 <script type="text/javascript">process_dates()</script>
111 <script type="text/javascript">process_dates()</script>
112
112
113
113
114 </body>
114 </body>
115 </html>
115 </html>
116
116
117 $ echo babar
117 $ echo babar
118 babar
118 babar
119 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
119 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
120 200 Script output follows
120 200 Script output follows
121
121
122 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
122 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
123 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
123 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
124 <head>
124 <head>
125 <link rel="icon" href="/static/hgicon.png" type="image/png" />
125 <link rel="icon" href="/static/hgicon.png" type="image/png" />
126 <meta name="robots" content="index, nofollow" />
126 <meta name="robots" content="index, nofollow" />
127 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
127 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
128 <script type="text/javascript" src="/static/mercurial.js"></script>
128 <script type="text/javascript" src="/static/mercurial.js"></script>
129
129
130 <title>test: log</title>
130 <title>test: log</title>
131 <link rel="alternate" type="application/atom+xml"
131 <link rel="alternate" type="application/atom+xml"
132 href="/atom-log" title="Atom feed for test" />
132 href="/atom-log" title="Atom feed for test" />
133 <link rel="alternate" type="application/rss+xml"
133 <link rel="alternate" type="application/rss+xml"
134 href="/rss-log" title="RSS feed for test" />
134 href="/rss-log" title="RSS feed for test" />
135 </head>
135 </head>
136 <body>
136 <body>
137
137
138 <div class="container">
138 <div class="container">
139 <div class="menu">
139 <div class="menu">
140 <div class="logo">
140 <div class="logo">
141 <a href="http://mercurial.selenic.com/">
141 <a href="http://mercurial.selenic.com/">
142 <img src="/static/hglogo.png" alt="mercurial" /></a>
142 <img src="/static/hglogo.png" alt="mercurial" /></a>
143 </div>
143 </div>
144 <ul>
144 <ul>
145 <li class="active">log</li>
145 <li class="active">log</li>
146 <li><a href="/graph/000000000000">graph</a></li>
146 <li><a href="/graph/000000000000">graph</a></li>
147 <li><a href="/tags">tags</a></li>
147 <li><a href="/tags">tags</a></li>
148 <li><a href="/bookmarks">bookmarks</a></li>
148 <li><a href="/bookmarks">bookmarks</a></li>
149 <li><a href="/branches">branches</a></li>
149 <li><a href="/branches">branches</a></li>
150 </ul>
150 </ul>
151 <ul>
151 <ul>
152 <li><a href="/rev/000000000000">changeset</a></li>
152 <li><a href="/rev/000000000000">changeset</a></li>
153 <li><a href="/file/000000000000">browse</a></li>
153 <li><a href="/file/000000000000">browse</a></li>
154 </ul>
154 </ul>
155 <ul>
155 <ul>
156
156
157 </ul>
157 </ul>
158 <ul>
158 <ul>
159 <li><a href="/help">help</a></li>
159 <li><a href="/help">help</a></li>
160 </ul>
160 </ul>
161 <p>
161 <p>
162 <div class="atom-logo">
162 <div class="atom-logo">
163 <a href="/atom-log" title="subscribe to atom feed">
163 <a href="/atom-log" title="subscribe to atom feed">
164 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
164 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
165 </a>
165 </a>
166 </div>
166 </div>
167 </div>
167 </div>
168
168
169 <div class="main">
169 <div class="main">
170 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
170 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
171 <h3>log</h3>
171 <h3>log</h3>
172
172
173 <form class="search" action="/log">
173 <form class="search" action="/log">
174
174
175 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
175 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
176 <div id="hint">find changesets by author, revision,
176 <div id="hint">find changesets by author, revision,
177 files, or words in the commit message</div>
177 files, or words in the commit message</div>
178 </form>
178 </form>
179
179
180 <div class="navigate">
180 <div class="navigate">
181 <a href="/shortlog/-1?revcount=5">less</a>
181 <a href="/shortlog/-1?revcount=5">less</a>
182 <a href="/shortlog/-1?revcount=20">more</a>
182 <a href="/shortlog/-1?revcount=20">more</a>
183 | rev -1:
183 | rev -1:
184 </div>
184 </div>
185
185
186 <table class="bigtable">
186 <table class="bigtable">
187 <tr>
187 <tr>
188 <th class="age">age</th>
188 <th class="age">age</th>
189 <th class="author">author</th>
189 <th class="author">author</th>
190 <th class="description">description</th>
190 <th class="description">description</th>
191 </tr>
191 </tr>
192 <tbody class="stripes2">
192 <tbody class="stripes2">
193
193
194 </tbody>
194 </tbody>
195 </table>
195 </table>
196
196
197 <div class="navigate">
197 <div class="navigate">
198 <a href="/shortlog/-1?revcount=5">less</a>
198 <a href="/shortlog/-1?revcount=5">less</a>
199 <a href="/shortlog/-1?revcount=20">more</a>
199 <a href="/shortlog/-1?revcount=20">more</a>
200 | rev -1:
200 | rev -1:
201 </div>
201 </div>
202
202
203 <script type="text/javascript">
203 <script type="text/javascript">
204 ajaxScrollInit(
204 ajaxScrollInit(
205 '/shortlog/%next%',
205 '/shortlog/%next%',
206 '', <!-- NEXTHASH
206 '', <!-- NEXTHASH
207 function (htmlText, previousVal) {
207 function (htmlText, previousVal) {
208 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
208 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
209 return m ? m[1] : null;
209 return m ? m[1] : null;
210 },
210 },
211 '.bigtable > tbody:nth-of-type(2)',
211 '.bigtable > tbody:nth-of-type(2)',
212 '<tr class="%class%">\
212 '<tr class="%class%">\
213 <td colspan="3" style="text-align: center;">%text%</td>\
213 <td colspan="3" style="text-align: center;">%text%</td>\
214 </tr>'
214 </tr>'
215 );
215 );
216 </script>
216 </script>
217
217
218 </div>
218 </div>
219 </div>
219 </div>
220
220
221 <script type="text/javascript">process_dates()</script>
221 <script type="text/javascript">process_dates()</script>
222
222
223
223
224 </body>
224 </body>
225 </html>
225 </html>
226
226
227 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph')
227 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph')
228 200 Script output follows
228 200 Script output follows
229
229
230 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
230 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
231 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
231 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
232 <head>
232 <head>
233 <link rel="icon" href="/static/hgicon.png" type="image/png" />
233 <link rel="icon" href="/static/hgicon.png" type="image/png" />
234 <meta name="robots" content="index, nofollow" />
234 <meta name="robots" content="index, nofollow" />
235 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
235 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
236 <script type="text/javascript" src="/static/mercurial.js"></script>
236 <script type="text/javascript" src="/static/mercurial.js"></script>
237
237
238 <title>test: revision graph</title>
238 <title>test: revision graph</title>
239 <link rel="alternate" type="application/atom+xml"
239 <link rel="alternate" type="application/atom+xml"
240 href="/atom-log" title="Atom feed for test: log" />
240 href="/atom-log" title="Atom feed for test: log" />
241 <link rel="alternate" type="application/rss+xml"
241 <link rel="alternate" type="application/rss+xml"
242 href="/rss-log" title="RSS feed for test: log" />
242 href="/rss-log" title="RSS feed for test: log" />
243 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
243 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
244 </head>
244 </head>
245 <body>
245 <body>
246
246
247 <div class="container">
247 <div class="container">
248 <div class="menu">
248 <div class="menu">
249 <div class="logo">
249 <div class="logo">
250 <a href="http://mercurial.selenic.com/">
250 <a href="http://mercurial.selenic.com/">
251 <img src="/static/hglogo.png" alt="mercurial" /></a>
251 <img src="/static/hglogo.png" alt="mercurial" /></a>
252 </div>
252 </div>
253 <ul>
253 <ul>
254 <li><a href="/shortlog/000000000000">log</a></li>
254 <li><a href="/shortlog/000000000000">log</a></li>
255 <li class="active">graph</li>
255 <li class="active">graph</li>
256 <li><a href="/tags">tags</a></li>
256 <li><a href="/tags">tags</a></li>
257 <li><a href="/bookmarks">bookmarks</a></li>
257 <li><a href="/bookmarks">bookmarks</a></li>
258 <li><a href="/branches">branches</a></li>
258 <li><a href="/branches">branches</a></li>
259 </ul>
259 </ul>
260 <ul>
260 <ul>
261 <li><a href="/rev/000000000000">changeset</a></li>
261 <li><a href="/rev/000000000000">changeset</a></li>
262 <li><a href="/file/000000000000">browse</a></li>
262 <li><a href="/file/000000000000">browse</a></li>
263 </ul>
263 </ul>
264 <ul>
264 <ul>
265 <li><a href="/help">help</a></li>
265 <li><a href="/help">help</a></li>
266 </ul>
266 </ul>
267 <p>
267 <p>
268 <div class="atom-logo">
268 <div class="atom-logo">
269 <a href="/atom-log" title="subscribe to atom feed">
269 <a href="/atom-log" title="subscribe to atom feed">
270 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
270 <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed">
271 </a>
271 </a>
272 </div>
272 </div>
273 </div>
273 </div>
274
274
275 <div class="main">
275 <div class="main">
276 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
276 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
277 <h3>graph</h3>
277 <h3>graph</h3>
278
278
279 <form class="search" action="/log">
279 <form class="search" action="/log">
280
280
281 <p><input name="rev" id="search1" type="text" size="30" /></p>
281 <p><input name="rev" id="search1" type="text" size="30" /></p>
282 <div id="hint">find changesets by author, revision,
282 <div id="hint">find changesets by author, revision,
283 files, or words in the commit message</div>
283 files, or words in the commit message</div>
284 </form>
284 </form>
285
285
286 <div class="navigate">
286 <div class="navigate">
287 <a href="/graph/-1?revcount=30">less</a>
287 <a href="/graph/-1?revcount=30">less</a>
288 <a href="/graph/-1?revcount=120">more</a>
288 <a href="/graph/-1?revcount=120">more</a>
289 | rev -1:
289 | rev -1:
290 </div>
290 </div>
291
291
292 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
292 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
293
293
294 <div id="wrapper">
294 <div id="wrapper">
295 <ul id="nodebgs" class="stripes2"></ul>
295 <ul id="nodebgs" class="stripes2"></ul>
296 <canvas id="graph" width="480" height="12"></canvas>
296 <canvas id="graph" width="480" height="12"></canvas>
297 <ul id="graphnodes"></ul>
297 <ul id="graphnodes"></ul>
298 </div>
298 </div>
299
299
300 <script type="text/javascript">
300 <script type="text/javascript">
301 <!-- hide script content
301 <!-- hide script content
302
302
303 var data = [];
303 var data = [];
304 var graph = new Graph();
304 var graph = new Graph();
305 graph.scale(39);
305 graph.scale(39);
306
306
307 graph.vertex = function(x, y, color, parity, cur) {
307 graph.vertex = function(x, y, color, parity, cur) {
308
308
309 this.ctx.beginPath();
309 this.ctx.beginPath();
310 color = this.setColor(color, 0.25, 0.75);
310 color = this.setColor(color, 0.25, 0.75);
311 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
311 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
312 this.ctx.fill();
312 this.ctx.fill();
313
313
314 var bg = '<li class="bg"></li>';
314 var bg = '<li class="bg"></li>';
315 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
315 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
316 var nstyle = 'padding-left: ' + left + 'px;';
316 var nstyle = 'padding-left: ' + left + 'px;';
317
317
318 var tagspan = '';
318 var tagspan = '';
319 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
319 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
320 tagspan = '<span class="logtags">';
320 tagspan = '<span class="logtags">';
321 if (cur[6][1]) {
321 if (cur[6][1]) {
322 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
322 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
323 tagspan += cur[6][0] + '</span> ';
323 tagspan += cur[6][0] + '</span> ';
324 } else if (!cur[6][1] && cur[6][0] != 'default') {
324 } else if (!cur[6][1] && cur[6][0] != 'default') {
325 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
325 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
326 tagspan += cur[6][0] + '</span> ';
326 tagspan += cur[6][0] + '</span> ';
327 }
327 }
328 if (cur[7].length) {
328 if (cur[7].length) {
329 for (var t in cur[7]) {
329 for (var t in cur[7]) {
330 var tag = cur[7][t];
330 var tag = cur[7][t];
331 tagspan += '<span class="tag">' + tag + '</span> ';
331 tagspan += '<span class="tag">' + tag + '</span> ';
332 }
332 }
333 }
333 }
334 if (cur[8].length) {
334 if (cur[8].length) {
335 for (var b in cur[8]) {
335 for (var b in cur[8]) {
336 var bookmark = cur[8][b];
336 var bookmark = cur[8][b];
337 tagspan += '<span class="tag">' + bookmark + '</span> ';
337 tagspan += '<span class="tag">' + bookmark + '</span> ';
338 }
338 }
339 }
339 }
340 tagspan += '</span>';
340 tagspan += '</span>';
341 }
341 }
342
342
343 var item = '<li style="' + nstyle + '"><span class="desc">';
343 var item = '<li style="' + nstyle + '"><span class="desc">';
344 item += '<a href="/rev/' + cur[0] + '" title="' + cur[0] + '">' + cur[3] + '</a>';
344 item += '<a href="/rev/' + cur[0] + '" title="' + cur[0] + '">' + cur[3] + '</a>';
345 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
345 item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
346
346
347 return [bg, item];
347 return [bg, item];
348
348
349 }
349 }
350
350
351 graph.render(data);
351 graph.render(data);
352
352
353 // stop hiding script -->
353 // stop hiding script -->
354 </script>
354 </script>
355
355
356 <div class="navigate">
356 <div class="navigate">
357 <a href="/graph/-1?revcount=30">less</a>
357 <a href="/graph/-1?revcount=30">less</a>
358 <a href="/graph/-1?revcount=120">more</a>
358 <a href="/graph/-1?revcount=120">more</a>
359 | rev -1:
359 | rev -1:
360 </div>
360 </div>
361
361
362 <script type="text/javascript">
363 ajaxScrollInit(
364 '/graph/-1?revcount=%next%',
365 60+60,
366 function (htmlText, previousVal) { return previousVal + 60; },
367 '#wrapper',
368 '<div class="%class%" style="text-align: center;">%text%</div>',
369 'graph'
370 );
371 </script>
372
362 </div>
373 </div>
363 </div>
374 </div>
364
375
365 <script type="text/javascript">process_dates()</script>
376 <script type="text/javascript">process_dates()</script>
366
377
367
378
368 </body>
379 </body>
369 </html>
380 </html>
370
381
371 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file')
382 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file')
372 200 Script output follows
383 200 Script output follows
373
384
374 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
385 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
375 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
386 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
376 <head>
387 <head>
377 <link rel="icon" href="/static/hgicon.png" type="image/png" />
388 <link rel="icon" href="/static/hgicon.png" type="image/png" />
378 <meta name="robots" content="index, nofollow" />
389 <meta name="robots" content="index, nofollow" />
379 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
390 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
380 <script type="text/javascript" src="/static/mercurial.js"></script>
391 <script type="text/javascript" src="/static/mercurial.js"></script>
381
392
382 <title>test: 000000000000 /</title>
393 <title>test: 000000000000 /</title>
383 </head>
394 </head>
384 <body>
395 <body>
385
396
386 <div class="container">
397 <div class="container">
387 <div class="menu">
398 <div class="menu">
388 <div class="logo">
399 <div class="logo">
389 <a href="http://mercurial.selenic.com/">
400 <a href="http://mercurial.selenic.com/">
390 <img src="/static/hglogo.png" alt="mercurial" /></a>
401 <img src="/static/hglogo.png" alt="mercurial" /></a>
391 </div>
402 </div>
392 <ul>
403 <ul>
393 <li><a href="/shortlog/000000000000">log</a></li>
404 <li><a href="/shortlog/000000000000">log</a></li>
394 <li><a href="/graph/000000000000">graph</a></li>
405 <li><a href="/graph/000000000000">graph</a></li>
395 <li><a href="/tags">tags</a></li>
406 <li><a href="/tags">tags</a></li>
396 <li><a href="/bookmarks">bookmarks</a></li>
407 <li><a href="/bookmarks">bookmarks</a></li>
397 <li><a href="/branches">branches</a></li>
408 <li><a href="/branches">branches</a></li>
398 </ul>
409 </ul>
399 <ul>
410 <ul>
400 <li><a href="/rev/000000000000">changeset</a></li>
411 <li><a href="/rev/000000000000">changeset</a></li>
401 <li class="active">browse</li>
412 <li class="active">browse</li>
402 </ul>
413 </ul>
403 <ul>
414 <ul>
404
415
405 </ul>
416 </ul>
406 <ul>
417 <ul>
407 <li><a href="/help">help</a></li>
418 <li><a href="/help">help</a></li>
408 </ul>
419 </ul>
409 </div>
420 </div>
410
421
411 <div class="main">
422 <div class="main">
412 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
423 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
413 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
424 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
414
425
415 <form class="search" action="/log">
426 <form class="search" action="/log">
416
427
417 <p><input name="rev" id="search1" type="text" size="30" /></p>
428 <p><input name="rev" id="search1" type="text" size="30" /></p>
418 <div id="hint">find changesets by author, revision,
429 <div id="hint">find changesets by author, revision,
419 files, or words in the commit message</div>
430 files, or words in the commit message</div>
420 </form>
431 </form>
421
432
422 <table class="bigtable">
433 <table class="bigtable">
423 <tr>
434 <tr>
424 <th class="name">name</th>
435 <th class="name">name</th>
425 <th class="size">size</th>
436 <th class="size">size</th>
426 <th class="permissions">permissions</th>
437 <th class="permissions">permissions</th>
427 </tr>
438 </tr>
428 <tbody class="stripes2">
439 <tbody class="stripes2">
429 <tr class="fileline">
440 <tr class="fileline">
430 <td class="name"><a href="/file/000000000000/">[up]</a></td>
441 <td class="name"><a href="/file/000000000000/">[up]</a></td>
431 <td class="size"></td>
442 <td class="size"></td>
432 <td class="permissions">drwxr-xr-x</td>
443 <td class="permissions">drwxr-xr-x</td>
433 </tr>
444 </tr>
434
445
435
446
436 </tbody>
447 </tbody>
437 </table>
448 </table>
438 </div>
449 </div>
439 </div>
450 </div>
440 <script type="text/javascript">process_dates()</script>
451 <script type="text/javascript">process_dates()</script>
441
452
442
453
443 </body>
454 </body>
444 </html>
455 </html>
445
456
446
457
447 $ cd ..
458 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now