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