##// END OF EJS Templates
gitweb: apply styles from annotate tooltip to followlines popup...
av6 -
r35026:b445fc69 default
parent child Browse files
Show More
@@ -1,390 +1,389 b''
1 1 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
2 2 a { color:#0000cc; }
3 3 a:hover, a:visited, a:active { color:#880000; }
4 4 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
5 5 div.page_header a:visited { color:#0000cc; }
6 6 div.page_header a:hover { color:#880000; }
7 7 div.page_nav {
8 8 padding:8px;
9 9 display: flex;
10 10 justify-content: space-between;
11 11 align-items: center;
12 12 }
13 13 div.page_nav a:visited { color:#0000cc; }
14 14 div.extra_nav {
15 15 padding: 8px;
16 16 }
17 17 div.extra_nav a:visited {
18 18 color: #0000cc;
19 19 }
20 20 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
21 21 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
22 22 div.page_footer_text { float:left; color:#555555; font-style:italic; }
23 23 div.page_body { padding:8px; }
24 24 div.title, a.title {
25 25 display:block; padding:6px 8px;
26 26 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
27 27 }
28 28 a.title:hover { background-color: #d9d8d1; }
29 29 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
30 30 div.log_body { padding:8px 8px 8px 150px; }
31 31 .age { white-space:nowrap; }
32 32 span.age { position:relative; float:left; width:142px; font-style:italic; }
33 33 div.log_link {
34 34 padding:0px 8px;
35 35 font-size:10px; font-family:sans-serif; font-style:normal;
36 36 position:relative; float:left; width:136px;
37 37 }
38 38 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
39 39 a.list { text-decoration:none; color:#000000; }
40 40 a.list:hover { text-decoration:underline; color:#880000; }
41 41 table { padding:8px 4px; }
42 42 th { padding:2px 5px; font-size:12px; text-align:left; }
43 43 .parity0 { background-color:#ffffff; }
44 44 tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; }
45 45 tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover,
46 46 pre.sourcelines.stripes > :nth-child(4n+2):hover,
47 47 pre.sourcelines.stripes > :nth-child(4n+4):hover,
48 48 pre.sourcelines.stripes > :nth-child(4n+1):hover + :nth-child(4n+2),
49 49 pre.sourcelines.stripes > :nth-child(4n+3):hover + :nth-child(4n+4) { background-color:#edece6; }
50 50 td { padding:2px 5px; font-size:12px; vertical-align:top; }
51 51 td.closed { background-color: #99f; }
52 52 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
53 53 td.indexlinks { white-space: nowrap; }
54 54 td.indexlinks a {
55 55 padding: 2px 5px; line-height: 10px;
56 56 border: 1px solid;
57 57 color: #ffffff; background-color: #7777bb;
58 58 border-color: #aaaadd #333366 #333366 #aaaadd;
59 59 font-weight: bold; text-align: center; text-decoration: none;
60 60 font-size: 10px;
61 61 }
62 62 td.indexlinks a:hover { background-color: #6666aa; }
63 63 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
64 64 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
65 65 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
66 66
67 67 .search {
68 68 margin-right: 8px;
69 69 }
70 70
71 71 div#hint {
72 72 position: absolute;
73 73 display: none;
74 74 width: 250px;
75 75 padding: 5px;
76 76 background: #ffc;
77 77 border: 1px solid yellow;
78 78 border-radius: 5px;
79 79 }
80 80
81 81 #searchform:hover div#hint { display: block; }
82 82
83 83 tr.thisrev a { color:#999999; text-decoration: none; }
84 84 tr.thisrev pre { color:#009900; }
85 85 td.annotate {
86 86 white-space: nowrap;
87 87 }
88 88 div.annotate-info {
89 89 z-index: 5;
90 90 display: none;
91 91 position: absolute;
92 92 background-color: #FFFFFF;
93 93 border: 1px solid #d9d8d1;
94 94 text-align: left;
95 95 color: #000000;
96 96 padding: 5px;
97 97 }
98 98 div.annotate-info a { color: #0000FF; text-decoration: underline; }
99 99 td.annotate:hover div.annotate-info { display: inline; }
100 100
101 101 #diffopts-form {
102 102 padding-left: 8px;
103 103 display: none;
104 104 }
105 105
106 106 .linenr { color:#999999; text-decoration:none }
107 107 div.rss_logo { float: right; white-space: nowrap; }
108 108 div.rss_logo a {
109 109 padding:3px 6px; line-height:10px;
110 110 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
111 111 color:#ffffff; background-color:#ff6600;
112 112 font-weight:bold; font-family:sans-serif; font-size:10px;
113 113 text-align:center; text-decoration:none;
114 114 }
115 115 div.rss_logo a:hover { background-color:#ee5500; }
116 116 pre { margin: 0; }
117 117 span.logtags span {
118 118 padding: 0px 4px;
119 119 font-size: 10px;
120 120 font-weight: normal;
121 121 border: 1px solid;
122 122 background-color: #ffaaff;
123 123 border-color: #ffccff #ff00ee #ff00ee #ffccff;
124 124 }
125 125 span.logtags span.tagtag {
126 126 background-color: #ffffaa;
127 127 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
128 128 }
129 129 span.logtags span.branchtag {
130 130 background-color: #aaffaa;
131 131 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
132 132 }
133 133 span.logtags span.inbranchtag {
134 134 background-color: #d5dde6;
135 135 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
136 136 }
137 137 span.logtags span.bookmarktag {
138 138 background-color: #afdffa;
139 139 border-color: #ccecff #46ace6 #46ace6 #ccecff;
140 140 }
141 141 span.difflineplus { color:#008800; }
142 142 span.difflineminus { color:#cc0000; }
143 143 span.difflineat { color:#990099; }
144 144 div.diffblocks { counter-reset: lineno; }
145 145 div.diffblock { counter-increment: lineno; }
146 146 pre.sourcelines { position: relative; counter-reset: lineno; }
147 147 pre.sourcelines > span {
148 148 display: inline-block;
149 149 box-sizing: border-box;
150 150 width: 100%;
151 151 padding: 0 0 0 5em;
152 152 counter-increment: lineno;
153 153 vertical-align: top;
154 154 }
155 155 pre.sourcelines > span:before {
156 156 -moz-user-select: -moz-none;
157 157 -khtml-user-select: none;
158 158 -webkit-user-select: none;
159 159 -ms-user-select: none;
160 160 user-select: none;
161 161 display: inline-block;
162 162 margin-left: -6em;
163 163 width: 4em;
164 164 color: #999;
165 165 text-align: right;
166 166 content: counters(lineno,".");
167 167 float: left;
168 168 }
169 169 pre.sourcelines > a {
170 170 display: inline-block;
171 171 position: absolute;
172 172 left: 0px;
173 173 width: 4em;
174 174 height: 1em;
175 175 }
176 176 tr:target td,
177 177 pre.sourcelines > span:target,
178 178 pre.sourcelines.stripes > span:target {
179 179 background-color: #bfdfff;
180 180 }
181 181
182 182 .description {
183 183 font-family: monospace;
184 184 white-space: pre;
185 185 }
186 186
187 187 /* Followlines */
188 188 tbody.sourcelines > tr.followlines-selected,
189 189 pre.sourcelines > span.followlines-selected {
190 190 background-color: #99C7E9 !important;
191 191 }
192 192
193 193 div#followlines {
194 background-color: #B7B7B7;
195 border: 1px solid #CCC;
196 border-radius: 5px;
197 padding: 4px;
194 background-color: #FFF;
195 border: 1px solid #d9d8d1;
196 padding: 5px;
198 197 position: fixed;
199 198 }
200 199
201 200 div.followlines-cancel {
202 201 text-align: right;
203 202 }
204 203
205 204 div.followlines-cancel > button {
206 205 line-height: 80%;
207 206 padding: 0;
208 207 border: 0;
209 208 border-radius: 2px;
210 209 background-color: inherit;
211 210 font-weight: bold;
212 211 }
213 212
214 213 div.followlines-cancel > button:hover {
215 214 color: #FFFFFF;
216 215 background-color: #CF1F1F;
217 216 }
218 217
219 218 div.followlines-link {
220 219 margin: 2px;
221 220 margin-top: 4px;
222 221 font-family: sans-serif;
223 222 }
224 223
225 224 .btn-followlines {
226 225 display: none;
227 226 cursor: pointer;
228 227 box-sizing: content-box;
229 228 font-size: 11px;
230 229 width: 13px;
231 230 height: 13px;
232 231 border-radius: 3px;
233 232 margin: 0px;
234 233 margin-top: -2px;
235 234 padding: 0px;
236 235 background-color: #E5FDE5;
237 236 border: 1px solid #9BC19B;
238 237 font-family: monospace;
239 238 text-align: center;
240 239 line-height: 5px;
241 240 }
242 241
243 242 tr .btn-followlines {
244 243 position: absolute;
245 244 }
246 245
247 246 span .btn-followlines {
248 247 float: left;
249 248 }
250 249
251 250 span.followlines-select .btn-followlines {
252 251 margin-left: -1.6em;
253 252 }
254 253
255 254 .btn-followlines:hover {
256 255 transform: scale(1.1, 1.1);
257 256 }
258 257
259 258 .btn-followlines .followlines-plus {
260 259 color: green;
261 260 }
262 261
263 262 .btn-followlines .followlines-minus {
264 263 color: red;
265 264 }
266 265
267 266 .btn-followlines-end {
268 267 background-color: #ffdcdc;
269 268 }
270 269
271 270 .sourcelines tr:hover .btn-followlines,
272 271 .sourcelines span.followlines-select:hover > .btn-followlines {
273 272 display: inline;
274 273 }
275 274
276 275 .btn-followlines-hidden,
277 276 .sourcelines tr:hover .btn-followlines-hidden {
278 277 display: none;
279 278 }
280 279
281 280 /* Graph */
282 281 div#wrapper {
283 282 position: relative;
284 283 margin: 0;
285 284 padding: 0;
286 285 margin-top: 3px;
287 286 }
288 287
289 288 canvas {
290 289 position: absolute;
291 290 z-index: 5;
292 291 top: -0.9em;
293 292 margin: 0;
294 293 }
295 294
296 295 ul#nodebgs {
297 296 list-style: none inside none;
298 297 padding: 0;
299 298 margin: 0;
300 299 top: -0.7em;
301 300 }
302 301
303 302 ul#graphnodes li, ul#nodebgs li {
304 303 height: 39px;
305 304 }
306 305
307 306 ul#graphnodes {
308 307 position: absolute;
309 308 z-index: 10;
310 309 top: -0.8em;
311 310 list-style: none inside none;
312 311 padding: 0;
313 312 }
314 313
315 314 ul#graphnodes li .info {
316 315 display: block;
317 316 font-size: 100%;
318 317 position: relative;
319 318 top: -3px;
320 319 font-style: italic;
321 320 }
322 321
323 322 /* Comparison */
324 323 .legend {
325 324 padding: 1.5% 0 1.5% 0;
326 325 }
327 326
328 327 .legendinfo {
329 328 border: 1px solid #d9d8d1;
330 329 font-size: 80%;
331 330 text-align: center;
332 331 padding: 0.5%;
333 332 }
334 333
335 334 .equal {
336 335 background-color: #ffffff;
337 336 }
338 337
339 338 .delete {
340 339 background-color: #faa;
341 340 color: #333;
342 341 }
343 342
344 343 .insert {
345 344 background-color: #ffa;
346 345 }
347 346
348 347 .replace {
349 348 background-color: #e8e8e8;
350 349 }
351 350
352 351 .comparison {
353 352 overflow-x: auto;
354 353 }
355 354
356 355 .header th {
357 356 text-align: center;
358 357 }
359 358
360 359 .block {
361 360 border-top: 1px solid #d9d8d1;
362 361 }
363 362
364 363 .scroll-loading {
365 364 -webkit-animation: change_color 1s linear 0s infinite alternate;
366 365 -moz-animation: change_color 1s linear 0s infinite alternate;
367 366 -o-animation: change_color 1s linear 0s infinite alternate;
368 367 animation: change_color 1s linear 0s infinite alternate;
369 368 }
370 369
371 370 @-webkit-keyframes change_color {
372 371 from { background-color: #A0CEFF; } to { }
373 372 }
374 373 @-moz-keyframes change_color {
375 374 from { background-color: #A0CEFF; } to { }
376 375 }
377 376 @-o-keyframes change_color {
378 377 from { background-color: #A0CEFF; } to { }
379 378 }
380 379 @keyframes change_color {
381 380 from { background-color: #A0CEFF; } to { }
382 381 }
383 382
384 383 .scroll-loading-error {
385 384 background-color: #FFCCCC !important;
386 385 }
387 386
388 387 #doc {
389 388 margin: 0 8px;
390 389 }
@@ -1,880 +1,879 b''
1 1 #require serve
2 2
3 3 Some tests for hgweb. Tests static files, plain files and different 404's.
4 4
5 5 $ hg init test
6 6 $ cd test
7 7 $ mkdir da
8 8 $ echo foo > da/foo
9 9 $ echo foo > foo
10 10 $ hg ci -Ambase
11 11 adding da/foo
12 12 adding foo
13 13 $ hg bookmark -r0 '@'
14 14 $ hg bookmark -r0 'a b c'
15 15 $ hg bookmark -r0 'd/e/f'
16 16 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
17 17 $ cat hg.pid >> $DAEMON_PIDS
18 18
19 19 manifest
20 20
21 21 $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw')
22 22 200 Script output follows
23 23
24 24
25 25 drwxr-xr-x da
26 26 -rw-r--r-- 4 foo
27 27
28 28
29 29 $ (get-with-headers.py localhost:$HGPORT 'file/tip/da?style=raw')
30 30 200 Script output follows
31 31
32 32
33 33 -rw-r--r-- 4 foo
34 34
35 35
36 36
37 37 plain file
38 38
39 39 $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?style=raw'
40 40 200 Script output follows
41 41
42 42 foo
43 43
44 44 should give a 404 - static file that does not exist
45 45
46 46 $ get-with-headers.py localhost:$HGPORT 'static/bogus'
47 47 404 Not Found
48 48
49 49 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
50 50 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
51 51 <head>
52 52 <link rel="icon" href="/static/hgicon.png" type="image/png" />
53 53 <meta name="robots" content="index, nofollow" />
54 54 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
55 55 <script type="text/javascript" src="/static/mercurial.js"></script>
56 56
57 57 <title>test: error</title>
58 58 </head>
59 59 <body>
60 60
61 61 <div class="container">
62 62 <div class="menu">
63 63 <div class="logo">
64 64 <a href="https://mercurial-scm.org/">
65 65 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
66 66 </div>
67 67 <ul>
68 68 <li><a href="/shortlog">log</a></li>
69 69 <li><a href="/graph">graph</a></li>
70 70 <li><a href="/tags">tags</a></li>
71 71 <li><a href="/bookmarks">bookmarks</a></li>
72 72 <li><a href="/branches">branches</a></li>
73 73 </ul>
74 74 <ul>
75 75 <li><a href="/help">help</a></li>
76 76 </ul>
77 77 </div>
78 78
79 79 <div class="main">
80 80
81 81 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
82 82 <h3>error</h3>
83 83
84 84
85 85 <form class="search" action="/log">
86 86
87 87 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
88 88 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
89 89 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
90 90 </form>
91 91
92 92 <div class="description">
93 93 <p>
94 94 An error occurred while processing your request:
95 95 </p>
96 96 <p>
97 97 Not Found
98 98 </p>
99 99 </div>
100 100 </div>
101 101 </div>
102 102
103 103
104 104
105 105 </body>
106 106 </html>
107 107
108 108 [1]
109 109
110 110 should give a 404 - bad revision
111 111
112 112 $ get-with-headers.py localhost:$HGPORT 'file/spam/foo?style=raw'
113 113 404 Not Found
114 114
115 115
116 116 error: revision not found: spam
117 117 [1]
118 118
119 119 should give a 400 - bad command
120 120
121 121 $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw'
122 122 400* (glob)
123 123
124 124
125 125 error: no such method: spam
126 126 [1]
127 127
128 128 $ get-with-headers.py --headeronly localhost:$HGPORT '?cmd=spam'
129 129 400 no such method: spam
130 130 [1]
131 131
132 132 should give a 400 - bad command as a part of url path (issue4071)
133 133
134 134 $ get-with-headers.py --headeronly localhost:$HGPORT 'spam'
135 135 400 no such method: spam
136 136 [1]
137 137
138 138 $ get-with-headers.py --headeronly localhost:$HGPORT 'raw-spam'
139 139 400 no such method: spam
140 140 [1]
141 141
142 142 $ get-with-headers.py --headeronly localhost:$HGPORT 'spam/tip/foo'
143 143 400 no such method: spam
144 144 [1]
145 145
146 146 should give a 404 - file does not exist
147 147
148 148 $ get-with-headers.py localhost:$HGPORT 'file/tip/bork?style=raw'
149 149 404 Not Found
150 150
151 151
152 152 error: bork@2ef0ac749a14: not found in manifest
153 153 [1]
154 154 $ get-with-headers.py localhost:$HGPORT 'file/tip/bork'
155 155 404 Not Found
156 156
157 157 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
158 158 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
159 159 <head>
160 160 <link rel="icon" href="/static/hgicon.png" type="image/png" />
161 161 <meta name="robots" content="index, nofollow" />
162 162 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
163 163 <script type="text/javascript" src="/static/mercurial.js"></script>
164 164
165 165 <title>test: error</title>
166 166 </head>
167 167 <body>
168 168
169 169 <div class="container">
170 170 <div class="menu">
171 171 <div class="logo">
172 172 <a href="https://mercurial-scm.org/">
173 173 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
174 174 </div>
175 175 <ul>
176 176 <li><a href="/shortlog">log</a></li>
177 177 <li><a href="/graph">graph</a></li>
178 178 <li><a href="/tags">tags</a></li>
179 179 <li><a href="/bookmarks">bookmarks</a></li>
180 180 <li><a href="/branches">branches</a></li>
181 181 </ul>
182 182 <ul>
183 183 <li><a href="/help">help</a></li>
184 184 </ul>
185 185 </div>
186 186
187 187 <div class="main">
188 188
189 189 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
190 190 <h3>error</h3>
191 191
192 192
193 193 <form class="search" action="/log">
194 194
195 195 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
196 196 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
197 197 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
198 198 </form>
199 199
200 200 <div class="description">
201 201 <p>
202 202 An error occurred while processing your request:
203 203 </p>
204 204 <p>
205 205 bork@2ef0ac749a14: not found in manifest
206 206 </p>
207 207 </div>
208 208 </div>
209 209 </div>
210 210
211 211
212 212
213 213 </body>
214 214 </html>
215 215
216 216 [1]
217 217 $ get-with-headers.py localhost:$HGPORT 'diff/tip/bork?style=raw'
218 218 404 Not Found
219 219
220 220
221 221 error: bork@2ef0ac749a14: not found in manifest
222 222 [1]
223 223
224 224 try bad style
225 225
226 226 $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=foobar')
227 227 200 Script output follows
228 228
229 229 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
230 230 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
231 231 <head>
232 232 <link rel="icon" href="/static/hgicon.png" type="image/png" />
233 233 <meta name="robots" content="index, nofollow" />
234 234 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
235 235 <script type="text/javascript" src="/static/mercurial.js"></script>
236 236
237 237 <title>test: 2ef0ac749a14 /</title>
238 238 </head>
239 239 <body>
240 240
241 241 <div class="container">
242 242 <div class="menu">
243 243 <div class="logo">
244 244 <a href="https://mercurial-scm.org/">
245 245 <img src="/static/hglogo.png" alt="mercurial" /></a>
246 246 </div>
247 247 <ul>
248 248 <li><a href="/shortlog/tip">log</a></li>
249 249 <li><a href="/graph/tip">graph</a></li>
250 250 <li><a href="/tags">tags</a></li>
251 251 <li><a href="/bookmarks">bookmarks</a></li>
252 252 <li><a href="/branches">branches</a></li>
253 253 </ul>
254 254 <ul>
255 255 <li><a href="/rev/tip">changeset</a></li>
256 256 <li class="active">browse</li>
257 257 </ul>
258 258 <ul>
259 259
260 260 </ul>
261 261 <ul>
262 262 <li><a href="/help">help</a></li>
263 263 </ul>
264 264 </div>
265 265
266 266 <div class="main">
267 267 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
268 268 <h3>
269 269 directory / @ 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a>
270 270 <span class="tag">tip</span> <span class="tag">@</span> <span class="tag">a b c</span> <span class="tag">d/e/f</span>
271 271 </h3>
272 272
273 273
274 274 <form class="search" action="/log">
275 275
276 276 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
277 277 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
278 278 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
279 279 </form>
280 280
281 281 <table class="bigtable">
282 282 <thead>
283 283 <tr>
284 284 <th class="name">name</th>
285 285 <th class="size">size</th>
286 286 <th class="permissions">permissions</th>
287 287 </tr>
288 288 </thead>
289 289 <tbody class="stripes2">
290 290 <tr class="fileline">
291 291 <td class="name"><a href="/file/tip/">[up]</a></td>
292 292 <td class="size"></td>
293 293 <td class="permissions">drwxr-xr-x</td>
294 294 </tr>
295 295
296 296 <tr class="fileline">
297 297 <td class="name">
298 298 <a href="/file/tip/da">
299 299 <img src="/static/coal-folder.png" alt="dir."/> da/
300 300 </a>
301 301 <a href="/file/tip/da/">
302 302
303 303 </a>
304 304 </td>
305 305 <td class="size"></td>
306 306 <td class="permissions">drwxr-xr-x</td>
307 307 </tr>
308 308
309 309 <tr class="fileline">
310 310 <td class="filename">
311 311 <a href="/file/tip/foo">
312 312 <img src="/static/coal-file.png" alt="file"/> foo
313 313 </a>
314 314 </td>
315 315 <td class="size">4</td>
316 316 <td class="permissions">-rw-r--r--</td>
317 317 </tr>
318 318 </tbody>
319 319 </table>
320 320 </div>
321 321 </div>
322 322
323 323
324 324 </body>
325 325 </html>
326 326
327 327
328 328 stop and restart
329 329
330 330 $ killdaemons.py
331 331 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
332 332 $ cat hg.pid >> $DAEMON_PIDS
333 333
334 334 Test the access/error files are opened in append mode
335 335
336 336 $ $PYTHON -c "print len(file('access.log').readlines()), 'log lines written'"
337 337 14 log lines written
338 338
339 339 static file
340 340
341 341 $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
342 342 200 Script output follows
343 content-length: 9066
343 content-length: 9044
344 344 content-type: text/css
345 345
346 346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
347 347 a { color:#0000cc; }
348 348 a:hover, a:visited, a:active { color:#880000; }
349 349 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
350 350 div.page_header a:visited { color:#0000cc; }
351 351 div.page_header a:hover { color:#880000; }
352 352 div.page_nav {
353 353 padding:8px;
354 354 display: flex;
355 355 justify-content: space-between;
356 356 align-items: center;
357 357 }
358 358 div.page_nav a:visited { color:#0000cc; }
359 359 div.extra_nav {
360 360 padding: 8px;
361 361 }
362 362 div.extra_nav a:visited {
363 363 color: #0000cc;
364 364 }
365 365 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
366 366 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
367 367 div.page_footer_text { float:left; color:#555555; font-style:italic; }
368 368 div.page_body { padding:8px; }
369 369 div.title, a.title {
370 370 display:block; padding:6px 8px;
371 371 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
372 372 }
373 373 a.title:hover { background-color: #d9d8d1; }
374 374 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
375 375 div.log_body { padding:8px 8px 8px 150px; }
376 376 .age { white-space:nowrap; }
377 377 span.age { position:relative; float:left; width:142px; font-style:italic; }
378 378 div.log_link {
379 379 padding:0px 8px;
380 380 font-size:10px; font-family:sans-serif; font-style:normal;
381 381 position:relative; float:left; width:136px;
382 382 }
383 383 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
384 384 a.list { text-decoration:none; color:#000000; }
385 385 a.list:hover { text-decoration:underline; color:#880000; }
386 386 table { padding:8px 4px; }
387 387 th { padding:2px 5px; font-size:12px; text-align:left; }
388 388 .parity0 { background-color:#ffffff; }
389 389 tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; }
390 390 tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover,
391 391 pre.sourcelines.stripes > :nth-child(4n+2):hover,
392 392 pre.sourcelines.stripes > :nth-child(4n+4):hover,
393 393 pre.sourcelines.stripes > :nth-child(4n+1):hover + :nth-child(4n+2),
394 394 pre.sourcelines.stripes > :nth-child(4n+3):hover + :nth-child(4n+4) { background-color:#edece6; }
395 395 td { padding:2px 5px; font-size:12px; vertical-align:top; }
396 396 td.closed { background-color: #99f; }
397 397 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
398 398 td.indexlinks { white-space: nowrap; }
399 399 td.indexlinks a {
400 400 padding: 2px 5px; line-height: 10px;
401 401 border: 1px solid;
402 402 color: #ffffff; background-color: #7777bb;
403 403 border-color: #aaaadd #333366 #333366 #aaaadd;
404 404 font-weight: bold; text-align: center; text-decoration: none;
405 405 font-size: 10px;
406 406 }
407 407 td.indexlinks a:hover { background-color: #6666aa; }
408 408 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
409 409 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
410 410 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
411 411
412 412 .search {
413 413 margin-right: 8px;
414 414 }
415 415
416 416 div#hint {
417 417 position: absolute;
418 418 display: none;
419 419 width: 250px;
420 420 padding: 5px;
421 421 background: #ffc;
422 422 border: 1px solid yellow;
423 423 border-radius: 5px;
424 424 }
425 425
426 426 #searchform:hover div#hint { display: block; }
427 427
428 428 tr.thisrev a { color:#999999; text-decoration: none; }
429 429 tr.thisrev pre { color:#009900; }
430 430 td.annotate {
431 431 white-space: nowrap;
432 432 }
433 433 div.annotate-info {
434 434 z-index: 5;
435 435 display: none;
436 436 position: absolute;
437 437 background-color: #FFFFFF;
438 438 border: 1px solid #d9d8d1;
439 439 text-align: left;
440 440 color: #000000;
441 441 padding: 5px;
442 442 }
443 443 div.annotate-info a { color: #0000FF; text-decoration: underline; }
444 444 td.annotate:hover div.annotate-info { display: inline; }
445 445
446 446 #diffopts-form {
447 447 padding-left: 8px;
448 448 display: none;
449 449 }
450 450
451 451 .linenr { color:#999999; text-decoration:none }
452 452 div.rss_logo { float: right; white-space: nowrap; }
453 453 div.rss_logo a {
454 454 padding:3px 6px; line-height:10px;
455 455 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
456 456 color:#ffffff; background-color:#ff6600;
457 457 font-weight:bold; font-family:sans-serif; font-size:10px;
458 458 text-align:center; text-decoration:none;
459 459 }
460 460 div.rss_logo a:hover { background-color:#ee5500; }
461 461 pre { margin: 0; }
462 462 span.logtags span {
463 463 padding: 0px 4px;
464 464 font-size: 10px;
465 465 font-weight: normal;
466 466 border: 1px solid;
467 467 background-color: #ffaaff;
468 468 border-color: #ffccff #ff00ee #ff00ee #ffccff;
469 469 }
470 470 span.logtags span.tagtag {
471 471 background-color: #ffffaa;
472 472 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
473 473 }
474 474 span.logtags span.branchtag {
475 475 background-color: #aaffaa;
476 476 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
477 477 }
478 478 span.logtags span.inbranchtag {
479 479 background-color: #d5dde6;
480 480 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
481 481 }
482 482 span.logtags span.bookmarktag {
483 483 background-color: #afdffa;
484 484 border-color: #ccecff #46ace6 #46ace6 #ccecff;
485 485 }
486 486 span.difflineplus { color:#008800; }
487 487 span.difflineminus { color:#cc0000; }
488 488 span.difflineat { color:#990099; }
489 489 div.diffblocks { counter-reset: lineno; }
490 490 div.diffblock { counter-increment: lineno; }
491 491 pre.sourcelines { position: relative; counter-reset: lineno; }
492 492 pre.sourcelines > span {
493 493 display: inline-block;
494 494 box-sizing: border-box;
495 495 width: 100%;
496 496 padding: 0 0 0 5em;
497 497 counter-increment: lineno;
498 498 vertical-align: top;
499 499 }
500 500 pre.sourcelines > span:before {
501 501 -moz-user-select: -moz-none;
502 502 -khtml-user-select: none;
503 503 -webkit-user-select: none;
504 504 -ms-user-select: none;
505 505 user-select: none;
506 506 display: inline-block;
507 507 margin-left: -6em;
508 508 width: 4em;
509 509 color: #999;
510 510 text-align: right;
511 511 content: counters(lineno,".");
512 512 float: left;
513 513 }
514 514 pre.sourcelines > a {
515 515 display: inline-block;
516 516 position: absolute;
517 517 left: 0px;
518 518 width: 4em;
519 519 height: 1em;
520 520 }
521 521 tr:target td,
522 522 pre.sourcelines > span:target,
523 523 pre.sourcelines.stripes > span:target {
524 524 background-color: #bfdfff;
525 525 }
526 526
527 527 .description {
528 528 font-family: monospace;
529 529 white-space: pre;
530 530 }
531 531
532 532 /* Followlines */
533 533 tbody.sourcelines > tr.followlines-selected,
534 534 pre.sourcelines > span.followlines-selected {
535 535 background-color: #99C7E9 !important;
536 536 }
537 537
538 538 div#followlines {
539 background-color: #B7B7B7;
540 border: 1px solid #CCC;
541 border-radius: 5px;
542 padding: 4px;
539 background-color: #FFF;
540 border: 1px solid #d9d8d1;
541 padding: 5px;
543 542 position: fixed;
544 543 }
545 544
546 545 div.followlines-cancel {
547 546 text-align: right;
548 547 }
549 548
550 549 div.followlines-cancel > button {
551 550 line-height: 80%;
552 551 padding: 0;
553 552 border: 0;
554 553 border-radius: 2px;
555 554 background-color: inherit;
556 555 font-weight: bold;
557 556 }
558 557
559 558 div.followlines-cancel > button:hover {
560 559 color: #FFFFFF;
561 560 background-color: #CF1F1F;
562 561 }
563 562
564 563 div.followlines-link {
565 564 margin: 2px;
566 565 margin-top: 4px;
567 566 font-family: sans-serif;
568 567 }
569 568
570 569 .btn-followlines {
571 570 display: none;
572 571 cursor: pointer;
573 572 box-sizing: content-box;
574 573 font-size: 11px;
575 574 width: 13px;
576 575 height: 13px;
577 576 border-radius: 3px;
578 577 margin: 0px;
579 578 margin-top: -2px;
580 579 padding: 0px;
581 580 background-color: #E5FDE5;
582 581 border: 1px solid #9BC19B;
583 582 font-family: monospace;
584 583 text-align: center;
585 584 line-height: 5px;
586 585 }
587 586
588 587 tr .btn-followlines {
589 588 position: absolute;
590 589 }
591 590
592 591 span .btn-followlines {
593 592 float: left;
594 593 }
595 594
596 595 span.followlines-select .btn-followlines {
597 596 margin-left: -1.6em;
598 597 }
599 598
600 599 .btn-followlines:hover {
601 600 transform: scale(1.1, 1.1);
602 601 }
603 602
604 603 .btn-followlines .followlines-plus {
605 604 color: green;
606 605 }
607 606
608 607 .btn-followlines .followlines-minus {
609 608 color: red;
610 609 }
611 610
612 611 .btn-followlines-end {
613 612 background-color: #ffdcdc;
614 613 }
615 614
616 615 .sourcelines tr:hover .btn-followlines,
617 616 .sourcelines span.followlines-select:hover > .btn-followlines {
618 617 display: inline;
619 618 }
620 619
621 620 .btn-followlines-hidden,
622 621 .sourcelines tr:hover .btn-followlines-hidden {
623 622 display: none;
624 623 }
625 624
626 625 /* Graph */
627 626 div#wrapper {
628 627 position: relative;
629 628 margin: 0;
630 629 padding: 0;
631 630 margin-top: 3px;
632 631 }
633 632
634 633 canvas {
635 634 position: absolute;
636 635 z-index: 5;
637 636 top: -0.9em;
638 637 margin: 0;
639 638 }
640 639
641 640 ul#nodebgs {
642 641 list-style: none inside none;
643 642 padding: 0;
644 643 margin: 0;
645 644 top: -0.7em;
646 645 }
647 646
648 647 ul#graphnodes li, ul#nodebgs li {
649 648 height: 39px;
650 649 }
651 650
652 651 ul#graphnodes {
653 652 position: absolute;
654 653 z-index: 10;
655 654 top: -0.8em;
656 655 list-style: none inside none;
657 656 padding: 0;
658 657 }
659 658
660 659 ul#graphnodes li .info {
661 660 display: block;
662 661 font-size: 100%;
663 662 position: relative;
664 663 top: -3px;
665 664 font-style: italic;
666 665 }
667 666
668 667 /* Comparison */
669 668 .legend {
670 669 padding: 1.5% 0 1.5% 0;
671 670 }
672 671
673 672 .legendinfo {
674 673 border: 1px solid #d9d8d1;
675 674 font-size: 80%;
676 675 text-align: center;
677 676 padding: 0.5%;
678 677 }
679 678
680 679 .equal {
681 680 background-color: #ffffff;
682 681 }
683 682
684 683 .delete {
685 684 background-color: #faa;
686 685 color: #333;
687 686 }
688 687
689 688 .insert {
690 689 background-color: #ffa;
691 690 }
692 691
693 692 .replace {
694 693 background-color: #e8e8e8;
695 694 }
696 695
697 696 .comparison {
698 697 overflow-x: auto;
699 698 }
700 699
701 700 .header th {
702 701 text-align: center;
703 702 }
704 703
705 704 .block {
706 705 border-top: 1px solid #d9d8d1;
707 706 }
708 707
709 708 .scroll-loading {
710 709 -webkit-animation: change_color 1s linear 0s infinite alternate;
711 710 -moz-animation: change_color 1s linear 0s infinite alternate;
712 711 -o-animation: change_color 1s linear 0s infinite alternate;
713 712 animation: change_color 1s linear 0s infinite alternate;
714 713 }
715 714
716 715 @-webkit-keyframes change_color {
717 716 from { background-color: #A0CEFF; } to { }
718 717 }
719 718 @-moz-keyframes change_color {
720 719 from { background-color: #A0CEFF; } to { }
721 720 }
722 721 @-o-keyframes change_color {
723 722 from { background-color: #A0CEFF; } to { }
724 723 }
725 724 @keyframes change_color {
726 725 from { background-color: #A0CEFF; } to { }
727 726 }
728 727
729 728 .scroll-loading-error {
730 729 background-color: #FFCCCC !important;
731 730 }
732 731
733 732 #doc {
734 733 margin: 0 8px;
735 734 }
736 735 304 Not Modified
737 736
738 737
739 738 phase changes are refreshed (issue4061)
740 739
741 740 $ echo bar >> foo
742 741 $ hg ci -msecret --secret
743 742 $ get-with-headers.py localhost:$HGPORT 'log?style=raw'
744 743 200 Script output follows
745 744
746 745
747 746 # HG changelog
748 747 # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
749 748
750 749 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
751 750 revision: 0
752 751 user: test
753 752 date: Thu, 01 Jan 1970 00:00:00 +0000
754 753 summary: base
755 754 branch: default
756 755 tag: tip
757 756 bookmark: @
758 757 bookmark: a b c
759 758 bookmark: d/e/f
760 759
761 760
762 761 $ hg phase --draft tip
763 762 $ get-with-headers.py localhost:$HGPORT 'log?style=raw'
764 763 200 Script output follows
765 764
766 765
767 766 # HG changelog
768 767 # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04
769 768
770 769 changeset: a084749e708a9c4c0a5b652a2a446322ce290e04
771 770 revision: 1
772 771 user: test
773 772 date: Thu, 01 Jan 1970 00:00:00 +0000
774 773 summary: secret
775 774 branch: default
776 775 tag: tip
777 776
778 777 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
779 778 revision: 0
780 779 user: test
781 780 date: Thu, 01 Jan 1970 00:00:00 +0000
782 781 summary: base
783 782 bookmark: @
784 783 bookmark: a b c
785 784 bookmark: d/e/f
786 785
787 786
788 787
789 788 access bookmarks
790 789
791 790 $ get-with-headers.py localhost:$HGPORT 'rev/@?style=paper' | egrep '^200|changeset 0:'
792 791 200 Script output follows
793 792 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
794 793
795 794 $ get-with-headers.py localhost:$HGPORT 'rev/%40?style=paper' | egrep '^200|changeset 0:'
796 795 200 Script output follows
797 796 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
798 797
799 798 $ get-with-headers.py localhost:$HGPORT 'rev/a%20b%20c?style=paper' | egrep '^200|changeset 0:'
800 799 200 Script output follows
801 800 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
802 801
803 802 $ get-with-headers.py localhost:$HGPORT 'rev/d%252Fe%252Ff?style=paper' | egrep '^200|changeset 0:'
804 803 200 Script output follows
805 804 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
806 805
807 806 no style can be loaded from directories other than the specified paths
808 807
809 808 $ mkdir -p x/templates/fallback
810 809 $ cat <<EOF > x/templates/fallback/map
811 810 > default = 'shortlog'
812 811 > shortlog = 'fall back to default\n'
813 812 > mimetype = 'text/plain'
814 813 > EOF
815 814 $ cat <<EOF > x/map
816 815 > default = 'shortlog'
817 816 > shortlog = 'access to outside of templates directory\n'
818 817 > mimetype = 'text/plain'
819 818 > EOF
820 819
821 820 $ killdaemons.py
822 821 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log \
823 822 > --config web.style=fallback --config web.templates=x/templates
824 823 $ cat hg.pid >> $DAEMON_PIDS
825 824
826 825 $ get-with-headers.py localhost:$HGPORT "?style=`pwd`/x"
827 826 200 Script output follows
828 827
829 828 fall back to default
830 829
831 830 $ get-with-headers.py localhost:$HGPORT '?style=..'
832 831 200 Script output follows
833 832
834 833 fall back to default
835 834
836 835 $ get-with-headers.py localhost:$HGPORT '?style=./..'
837 836 200 Script output follows
838 837
839 838 fall back to default
840 839
841 840 $ get-with-headers.py localhost:$HGPORT '?style=.../.../'
842 841 200 Script output follows
843 842
844 843 fall back to default
845 844
846 845 errors
847 846
848 847 $ cat errors.log
849 848
850 849 Uncaught exceptions result in a logged error and canned HTTP response
851 850
852 851 $ killdaemons.py
853 852 $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
854 853 $ cat hg.pid >> $DAEMON_PIDS
855 854
856 855 $ get-with-headers.py localhost:$HGPORT 'raiseerror' transfer-encoding content-type
857 856 500 Internal Server Error
858 857 transfer-encoding: chunked
859 858
860 859 Internal Server Error (no-eol)
861 860 [1]
862 861
863 862 $ killdaemons.py
864 863 $ head -1 errors.log
865 864 .* Exception happened during processing request '/raiseerror': (re)
866 865
867 866 Uncaught exception after partial content sent
868 867
869 868 $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
870 869 $ cat hg.pid >> $DAEMON_PIDS
871 870 $ get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type
872 871 200 Script output follows
873 872 transfer-encoding: chunked
874 873 content-type: text/plain
875 874
876 875 partial content
877 876 Internal Server Error (no-eol)
878 877
879 878 $ killdaemons.py
880 879 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now