Mercurial > hg
annotate tests/test-hgweb.t @ 25374:c2d691542d6a
test: lock test-unbundlehash to bundle1 usage
It is testing a bundle1 specific behavior. Bundle2 has its own way there. See
inline comment for details.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 27 May 2015 04:39:24 -0700 |
parents | 15afda349b11 |
children | 4d2b9b304ad0 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20256
diff
changeset
|
1 #require serve |
15446
c5c9ca3719f9
tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich <mads@kiilerich.com>
parents:
14046
diff
changeset
|
2 |
12432 | 3 Some tests for hgweb. Tests static files, plain files and different 404's. |
4 | |
5 $ hg init test | |
6 $ cd test | |
7 $ mkdir da | |
8 $ echo foo > da/foo | |
9 $ echo foo > foo | |
10 $ hg ci -Ambase | |
11 adding da/foo | |
12 adding foo | |
13 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
14 $ cat hg.pid >> $DAEMON_PIDS | |
15 | |
16 manifest | |
3942 | 17 |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
18 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=raw') |
12432 | 19 200 Script output follows |
20 | |
21 | |
22 drwxr-xr-x da | |
23 -rw-r--r-- 4 foo | |
24 | |
25 | |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
26 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/da?style=raw') |
12432 | 27 200 Script output follows |
28 | |
29 | |
30 -rw-r--r-- 4 foo | |
31 | |
32 | |
33 | |
34 plain file | |
35 | |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
36 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?style=raw' |
12432 | 37 200 Script output follows |
38 | |
39 foo | |
40 | |
41 should give a 404 - static file that does not exist | |
9842
d3dbdca92458
hgweb: don't choke when an inexistent style is requested (issue1901)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8167
diff
changeset
|
42 |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
43 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'static/bogus' |
12432 | 44 404 Not Found |
45 | |
46 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
47 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
48 <head> | |
49 <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
50 <meta name="robots" content="index, nofollow" /> | |
51 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
52 <script type="text/javascript" src="/static/mercurial.js"></script> |
12432 | 53 |
54 <title>test: error</title> | |
55 </head> | |
56 <body> | |
57 | |
58 <div class="container"> | |
59 <div class="menu"> | |
60 <div class="logo"> | |
61 <a href="http://mercurial.selenic.com/"> | |
62 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
63 </div> | |
64 <ul> | |
65 <li><a href="/shortlog">log</a></li> | |
66 <li><a href="/graph">graph</a></li> | |
67 <li><a href="/tags">tags</a></li> | |
13597
38c9837b1f75
hgweb: add separate page with bookmarks listing
Alexander Solovyov <alexander@solovyov.net>
parents:
12846
diff
changeset
|
68 <li><a href="/bookmarks">bookmarks</a></li> |
12432 | 69 <li><a href="/branches">branches</a></li> |
17290
7a9246abf9fe
hgweb: make paper:error consistent with template
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
17243
diff
changeset
|
70 </ul> |
7a9246abf9fe
hgweb: make paper:error consistent with template
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
17243
diff
changeset
|
71 <ul> |
12680
d664547ef540
hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents:
12666
diff
changeset
|
72 <li><a href="/help">help</a></li> |
12432 | 73 </ul> |
74 </div> | |
75 | |
76 <div class="main"> | |
77 | |
18264
d6ebdbdd70a5
tests: update hgweb tests to include breadcrumbs
Bryan O'Sullivan <bryano@fb.com>
parents:
17466
diff
changeset
|
78 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
12432 | 79 <h3>error</h3> |
80 | |
81 <form class="search" action="/log"> | |
82 | |
83 <p><input name="rev" id="search1" type="text" size="30"></p> | |
19796
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
84 <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
85 number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
12432 | 86 </form> |
87 | |
88 <div class="description"> | |
89 <p> | |
90 An error occurred while processing your request: | |
91 </p> | |
92 <p> | |
93 Not Found | |
94 </p> | |
95 </div> | |
96 </div> | |
97 </div> | |
98 | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
99 <script type="text/javascript">process_dates()</script> |
12432 | 100 |
101 | |
102 </body> | |
103 </html> | |
104 | |
105 [1] | |
106 | |
107 should give a 404 - bad revision | |
108 | |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
109 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/spam/foo?style=raw' |
12432 | 110 404 Not Found |
111 | |
112 | |
113 error: revision not found: spam | |
114 [1] | |
115 | |
116 should give a 400 - bad command | |
9842
d3dbdca92458
hgweb: don't choke when an inexistent style is requested (issue1901)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8167
diff
changeset
|
117 |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
118 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw' |
12432 | 119 400* (glob) |
120 | |
121 | |
122 error: no such method: spam | |
123 [1] | |
124 | |
22506
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
125 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT '?cmd=spam' |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
126 400 no such method: spam |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
127 [1] |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
128 |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
129 should give a 400 - bad command as a part of url path (issue4071) |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
130 |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
131 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'spam' |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
132 400 no such method: spam |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
133 [1] |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
134 |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
135 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'raw-spam' |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
136 400 no such method: spam |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
137 [1] |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
138 |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
139 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'spam/tip/foo' |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
140 400 no such method: spam |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
141 [1] |
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
142 |
12432 | 143 should give a 404 - file does not exist |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
144 |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
145 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork?style=raw' |
12432 | 146 404 Not Found |
147 | |
148 | |
149 error: bork@2ef0ac749a14: not found in manifest | |
150 [1] | |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
151 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork' |
12432 | 152 404 Not Found |
153 | |
154 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
155 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
156 <head> | |
157 <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
158 <meta name="robots" content="index, nofollow" /> | |
159 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
160 <script type="text/javascript" src="/static/mercurial.js"></script> |
12432 | 161 |
162 <title>test: error</title> | |
163 </head> | |
164 <body> | |
165 | |
166 <div class="container"> | |
167 <div class="menu"> | |
168 <div class="logo"> | |
169 <a href="http://mercurial.selenic.com/"> | |
170 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
171 </div> | |
172 <ul> | |
173 <li><a href="/shortlog">log</a></li> | |
174 <li><a href="/graph">graph</a></li> | |
175 <li><a href="/tags">tags</a></li> | |
13597
38c9837b1f75
hgweb: add separate page with bookmarks listing
Alexander Solovyov <alexander@solovyov.net>
parents:
12846
diff
changeset
|
176 <li><a href="/bookmarks">bookmarks</a></li> |
12432 | 177 <li><a href="/branches">branches</a></li> |
17290
7a9246abf9fe
hgweb: make paper:error consistent with template
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
17243
diff
changeset
|
178 </ul> |
7a9246abf9fe
hgweb: make paper:error consistent with template
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
17243
diff
changeset
|
179 <ul> |
12680
d664547ef540
hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents:
12666
diff
changeset
|
180 <li><a href="/help">help</a></li> |
12432 | 181 </ul> |
182 </div> | |
183 | |
184 <div class="main"> | |
185 | |
18264
d6ebdbdd70a5
tests: update hgweb tests to include breadcrumbs
Bryan O'Sullivan <bryano@fb.com>
parents:
17466
diff
changeset
|
186 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
12432 | 187 <h3>error</h3> |
188 | |
189 <form class="search" action="/log"> | |
190 | |
191 <p><input name="rev" id="search1" type="text" size="30"></p> | |
19796
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
192 <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
193 number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
12432 | 194 </form> |
195 | |
196 <div class="description"> | |
197 <p> | |
198 An error occurred while processing your request: | |
199 </p> | |
200 <p> | |
201 bork@2ef0ac749a14: not found in manifest | |
202 </p> | |
203 </div> | |
204 </div> | |
205 </div> | |
206 | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
207 <script type="text/javascript">process_dates()</script> |
12432 | 208 |
209 | |
210 </body> | |
211 </html> | |
212 | |
213 [1] | |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
214 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/bork?style=raw' |
12432 | 215 404 Not Found |
216 | |
217 | |
218 error: bork@2ef0ac749a14: not found in manifest | |
219 [1] | |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
220 |
12432 | 221 try bad style |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
222 |
17017
953faba28e91
tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
223 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=foobar') |
12432 | 224 200 Script output follows |
225 | |
226 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
227 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
228 <head> | |
229 <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
230 <meta name="robots" content="index, nofollow" /> | |
231 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
232 <script type="text/javascript" src="/static/mercurial.js"></script> |
12432 | 233 |
234 <title>test: 2ef0ac749a14 /</title> | |
235 </head> | |
236 <body> | |
237 | |
238 <div class="container"> | |
239 <div class="menu"> | |
240 <div class="logo"> | |
241 <a href="http://mercurial.selenic.com/"> | |
242 <img src="/static/hglogo.png" alt="mercurial" /></a> | |
243 </div> | |
244 <ul> | |
245 <li><a href="/shortlog/2ef0ac749a14">log</a></li> | |
246 <li><a href="/graph/2ef0ac749a14">graph</a></li> | |
247 <li><a href="/tags">tags</a></li> | |
13597
38c9837b1f75
hgweb: add separate page with bookmarks listing
Alexander Solovyov <alexander@solovyov.net>
parents:
12846
diff
changeset
|
248 <li><a href="/bookmarks">bookmarks</a></li> |
12432 | 249 <li><a href="/branches">branches</a></li> |
250 </ul> | |
251 <ul> | |
252 <li><a href="/rev/2ef0ac749a14">changeset</a></li> | |
253 <li class="active">browse</li> | |
254 </ul> | |
255 <ul> | |
256 | |
257 </ul> | |
12666
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
12432
diff
changeset
|
258 <ul> |
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
12432
diff
changeset
|
259 <li><a href="/help">help</a></li> |
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
12432
diff
changeset
|
260 </ul> |
12432 | 261 </div> |
262 | |
263 <div class="main"> | |
18264
d6ebdbdd70a5
tests: update hgweb tests to include breadcrumbs
Bryan O'Sullivan <bryano@fb.com>
parents:
17466
diff
changeset
|
264 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
12432 | 265 <h3>directory / @ 0:2ef0ac749a14 <span class="tag">tip</span> </h3> |
266 | |
267 <form class="search" action="/log"> | |
268 | |
269 <p><input name="rev" id="search1" type="text" size="30" /></p> | |
19796
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
270 <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
544848ef65f2
paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents:
19795
diff
changeset
|
271 number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
12432 | 272 </form> |
273 | |
274 <table class="bigtable"> | |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
23952
diff
changeset
|
275 <thead> |
12432 | 276 <tr> |
277 <th class="name">name</th> | |
278 <th class="size">size</th> | |
279 <th class="permissions">permissions</th> | |
280 </tr> | |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
23952
diff
changeset
|
281 </thead> |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
19076
diff
changeset
|
282 <tbody class="stripes2"> |
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
19076
diff
changeset
|
283 <tr class="fileline"> |
12432 | 284 <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td> |
285 <td class="size"></td> | |
286 <td class="permissions">drwxr-xr-x</td> | |
287 </tr> | |
288 | |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
19076
diff
changeset
|
289 <tr class="fileline"> |
12432 | 290 <td class="name"> |
291 <a href="/file/2ef0ac749a14/da"> | |
292 <img src="/static/coal-folder.png" alt="dir."/> da/ | |
293 </a> | |
294 <a href="/file/2ef0ac749a14/da/"> | |
295 | |
296 </a> | |
297 </td> | |
298 <td class="size"></td> | |
299 <td class="permissions">drwxr-xr-x</td> | |
300 </tr> | |
301 | |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
19076
diff
changeset
|
302 <tr class="fileline"> |
12432 | 303 <td class="filename"> |
304 <a href="/file/2ef0ac749a14/foo"> | |
305 <img src="/static/coal-file.png" alt="file"/> foo | |
306 </a> | |
307 </td> | |
308 <td class="size">4</td> | |
309 <td class="permissions">-rw-r--r--</td> | |
310 </tr> | |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
19076
diff
changeset
|
311 </tbody> |
12432 | 312 </table> |
313 </div> | |
314 </div> | |
14046
b24e5a708fad
web: Made elapsed time calculation dynamic (javascript).
Benoit Allard <benoit@aeteurope.nl>
parents:
13863
diff
changeset
|
315 <script type="text/javascript">process_dates()</script> |
12432 | 316 |
317 | |
318 </body> | |
319 </html> | |
320 | |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
321 |
12432 | 322 stop and restart |
323 | |
17466
d5a3bda6e170
killdaemons: take file argument explicitely
Patrick Mezard <patrick@mezard.eu>
parents:
17290
diff
changeset
|
324 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
12432 | 325 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log |
326 $ cat hg.pid >> $DAEMON_PIDS | |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
327 |
12432 | 328 Test the access/error files are opened in append mode |
329 | |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22578
diff
changeset
|
330 $ $PYTHON -c "print len(file('access.log').readlines()), 'log lines written'" |
22506
6e1fbcb18a75
hgweb: fail if an invalid command was supplied in url path (issue4071)
Anton Shestakov <engored@ya.ru>
parents:
20256
diff
changeset
|
331 14 log lines written |
12432 | 332 |
333 static file | |
5561
22713dce19f6
hgweb: return meaningful HTTP status codes instead of nonsense
Bryan O'Sullivan <bos@serpentine.com>
parents:
5384
diff
changeset
|
334 |
18380
a4d7fd7ad1f7
serve: don't send any content headers with 304 responses
Mads Kiilerich <madski@unity3d.com>
parents:
18264
diff
changeset
|
335 $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server |
12432 | 336 200 Script output follows |
23744
d1933c2e3c8c
templates: use CSS classes for diff styling
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23409
diff
changeset
|
337 content-length: 5372 |
18380
a4d7fd7ad1f7
serve: don't send any content headers with 304 responses
Mads Kiilerich <madski@unity3d.com>
parents:
18264
diff
changeset
|
338 content-type: text/css |
12432 | 339 |
19076
93493746c89a
css: remove repeated property
Alexander Plavin <me@aplavin.ru>
parents:
18380
diff
changeset
|
340 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; } |
12432 | 341 a { color:#0000cc; } |
342 a:hover, a:visited, a:active { color:#880000; } | |
343 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; } | |
344 div.page_header a:visited { color:#0000cc; } | |
345 div.page_header a:hover { color:#880000; } | |
346 div.page_nav { padding:8px; } | |
347 div.page_nav a:visited { color:#0000cc; } | |
348 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px} | |
349 div.page_footer { padding:4px 8px; background-color: #d9d8d1; } | |
350 div.page_footer_text { float:left; color:#555555; font-style:italic; } | |
351 div.page_body { padding:8px; } | |
352 div.title, a.title { | |
353 display:block; padding:6px 8px; | |
354 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000; | |
355 } | |
356 a.title:hover { background-color: #d9d8d1; } | |
357 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; } | |
358 div.log_body { padding:8px 8px 8px 150px; } | |
359 .age { white-space:nowrap; } | |
360 span.age { position:relative; float:left; width:142px; font-style:italic; } | |
361 div.log_link { | |
362 padding:0px 8px; | |
363 font-size:10px; font-family:sans-serif; font-style:normal; | |
364 position:relative; float:left; width:136px; | |
365 } | |
366 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; } | |
367 a.list { text-decoration:none; color:#000000; } | |
368 a.list:hover { text-decoration:underline; color:#880000; } | |
369 table { padding:8px 4px; } | |
370 th { padding:2px 5px; font-size:12px; text-align:left; } | |
371 tr.light:hover, .parity0:hover { background-color:#edece6; } | |
372 tr.dark, .parity1 { background-color:#f6f6f0; } | |
373 tr.dark:hover, .parity1:hover { background-color:#edece6; } | |
374 td { padding:2px 5px; font-size:12px; vertical-align:top; } | |
375 td.closed { background-color: #99f; } | |
376 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; } | |
377 td.indexlinks { white-space: nowrap; } | |
378 td.indexlinks a { | |
379 padding: 2px 5px; line-height: 10px; | |
380 border: 1px solid; | |
381 color: #ffffff; background-color: #7777bb; | |
382 border-color: #aaaadd #333366 #333366 #aaaadd; | |
383 font-weight: bold; text-align: center; text-decoration: none; | |
384 font-size: 10px; | |
385 } | |
386 td.indexlinks a:hover { background-color: #6666aa; } | |
387 div.pre { font-family:monospace; font-size:12px; white-space:pre; } | |
388 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; } | |
389 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; } | |
390 div.search { margin:4px 8px; position:absolute; top:56px; right:12px } | |
391 .linenr { color:#999999; text-decoration:none } | |
392 div.rss_logo { float: right; white-space: nowrap; } | |
393 div.rss_logo a { | |
394 padding:3px 6px; line-height:10px; | |
395 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; | |
396 color:#ffffff; background-color:#ff6600; | |
397 font-weight:bold; font-family:sans-serif; font-size:10px; | |
398 text-align:center; text-decoration:none; | |
399 } | |
400 div.rss_logo a:hover { background-color:#ee5500; } | |
401 pre { margin: 0; } | |
402 span.logtags span { | |
403 padding: 0px 4px; | |
404 font-size: 10px; | |
405 font-weight: normal; | |
406 border: 1px solid; | |
407 background-color: #ffaaff; | |
408 border-color: #ffccff #ff00ee #ff00ee #ffccff; | |
409 } | |
410 span.logtags span.tagtag { | |
411 background-color: #ffffaa; | |
412 border-color: #ffffcc #ffee00 #ffee00 #ffffcc; | |
413 } | |
414 span.logtags span.branchtag { | |
415 background-color: #aaffaa; | |
416 border-color: #ccffcc #00cc33 #00cc33 #ccffcc; | |
417 } | |
418 span.logtags span.inbranchtag { | |
419 background-color: #d5dde6; | |
420 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; | |
421 } | |
13863
b602ac02f1ba
hgweb: add bookmark labels to gitweb theme (based on 270f57d35525)
Yuya Nishihara <yuya@tcha.org>
parents:
13597
diff
changeset
|
422 span.logtags span.bookmarktag { |
b602ac02f1ba
hgweb: add bookmark labels to gitweb theme (based on 270f57d35525)
Yuya Nishihara <yuya@tcha.org>
parents:
13597
diff
changeset
|
423 background-color: #afdffa; |
b602ac02f1ba
hgweb: add bookmark labels to gitweb theme (based on 270f57d35525)
Yuya Nishihara <yuya@tcha.org>
parents:
13597
diff
changeset
|
424 border-color: #ccecff #46ace6 #46ace6 #ccecff; |
b602ac02f1ba
hgweb: add bookmark labels to gitweb theme (based on 270f57d35525)
Yuya Nishihara <yuya@tcha.org>
parents:
13597
diff
changeset
|
425 } |
23744
d1933c2e3c8c
templates: use CSS classes for diff styling
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23409
diff
changeset
|
426 span.difflineplus { color:#008800; } |
d1933c2e3c8c
templates: use CSS classes for diff styling
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23409
diff
changeset
|
427 span.difflineminus { color:#cc0000; } |
d1933c2e3c8c
templates: use CSS classes for diff styling
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23409
diff
changeset
|
428 span.difflineat { color:#990099; } |
12432 | 429 |
430 /* Graph */ | |
431 div#wrapper { | |
432 position: relative; | |
433 margin: 0; | |
434 padding: 0; | |
435 margin-top: 3px; | |
436 } | |
437 | |
438 canvas { | |
439 position: absolute; | |
440 z-index: 5; | |
441 top: -0.9em; | |
442 margin: 0; | |
443 } | |
444 | |
445 ul#nodebgs { | |
446 list-style: none inside none; | |
447 padding: 0; | |
448 margin: 0; | |
449 top: -0.7em; | |
450 } | |
451 | |
452 ul#graphnodes li, ul#nodebgs li { | |
453 height: 39px; | |
454 } | |
455 | |
456 ul#graphnodes { | |
457 position: absolute; | |
458 z-index: 10; | |
459 top: -0.8em; | |
460 list-style: none inside none; | |
461 padding: 0; | |
462 } | |
463 | |
464 ul#graphnodes li .info { | |
465 display: block; | |
466 font-size: 100%; | |
467 position: relative; | |
468 top: -3px; | |
469 font-style: italic; | |
470 } | |
17202
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
471 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
472 /* Comparison */ |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
473 .legend { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
474 padding: 1.5% 0 1.5% 0; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
475 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
476 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
477 .legendinfo { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
478 border: 1px solid #d9d8d1; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
479 font-size: 80%; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
480 text-align: center; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
481 padding: 0.5%; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
482 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
483 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
484 .equal { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
485 background-color: #ffffff; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
486 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
487 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
488 .delete { |
17243
106cdea0183d
hgweb: improve colors for comparison page
Matt Mackall <mpm@selenic.com>
parents:
17202
diff
changeset
|
489 background-color: #faa; |
106cdea0183d
hgweb: improve colors for comparison page
Matt Mackall <mpm@selenic.com>
parents:
17202
diff
changeset
|
490 color: #333; |
17202
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
491 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
492 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
493 .insert { |
17243
106cdea0183d
hgweb: improve colors for comparison page
Matt Mackall <mpm@selenic.com>
parents:
17202
diff
changeset
|
494 background-color: #ffa; |
17202
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
495 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
496 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
497 .replace { |
17243
106cdea0183d
hgweb: improve colors for comparison page
Matt Mackall <mpm@selenic.com>
parents:
17202
diff
changeset
|
498 background-color: #e8e8e8; |
17202
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
499 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
500 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
501 .comparison { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
502 overflow-x: auto; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
503 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
504 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
505 .header th { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
506 text-align: center; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
507 } |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
508 |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
509 .block { |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
510 border-top: 1px solid #d9d8d1; |
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
17017
diff
changeset
|
511 } |
20256
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
512 |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
513 .scroll-loading { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
514 -webkit-animation: change_color 1s linear 0s infinite alternate; |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
515 -moz-animation: change_color 1s linear 0s infinite alternate; |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
516 -o-animation: change_color 1s linear 0s infinite alternate; |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
517 animation: change_color 1s linear 0s infinite alternate; |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
518 } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
519 |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
520 @-webkit-keyframes change_color { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
521 from { background-color: #A0CEFF; } to { } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
522 } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
523 @-moz-keyframes change_color { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
524 from { background-color: #A0CEFF; } to { } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
525 } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
526 @-o-keyframes change_color { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
527 from { background-color: #A0CEFF; } to { } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
528 } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
529 @keyframes change_color { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
530 from { background-color: #A0CEFF; } to { } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
531 } |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
532 |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
533 .scroll-loading-error { |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
534 background-color: #FFCCCC !important; |
b786754ba604
test-hgweb-*: output change fixes from b1d65cb8
Augie Fackler <raf@durin42.com>
parents:
19796
diff
changeset
|
535 } |
12432 | 536 304 Not Modified |
537 | |
9842
d3dbdca92458
hgweb: don't choke when an inexistent style is requested (issue1901)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8167
diff
changeset
|
538 |
22577
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
539 phase changes are refreshed (issue4061) |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
540 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
541 $ echo bar >> foo |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
542 $ hg ci -msecret --secret |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
543 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw' |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
544 200 Script output follows |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
545 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
546 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
547 # HG changelog |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
548 # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
549 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
550 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
551 revision: 0 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
552 user: test |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
553 date: Thu, 01 Jan 1970 00:00:00 +0000 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
554 summary: base |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
555 branch: default |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
556 tag: tip |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
557 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
558 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
559 $ hg phase --draft tip |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
560 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw' |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
561 200 Script output follows |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
562 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
563 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
564 # HG changelog |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
565 # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
566 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
567 changeset: a084749e708a9c4c0a5b652a2a446322ce290e04 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
568 revision: 1 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
569 user: test |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
570 date: Thu, 01 Jan 1970 00:00:00 +0000 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
571 summary: secret |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
572 branch: default |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
573 tag: tip |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
574 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
575 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
576 revision: 0 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
577 user: test |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
578 date: Thu, 01 Jan 1970 00:00:00 +0000 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
579 summary: base |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
580 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
581 |
a111e460318a
hgweb: refresh hgweb.repo on phase change (issue4061)
Anton Shestakov <engored@ya.ru>
parents:
22506
diff
changeset
|
582 |
24296
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
583 no style can be loaded from directories other than the specified paths |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
584 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
585 $ mkdir -p x/templates/fallback |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
586 $ cat <<EOF > x/templates/fallback/map |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
587 > default = 'shortlog' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
588 > shortlog = 'fall back to default\n' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
589 > mimetype = 'text/plain' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
590 > EOF |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
591 $ cat <<EOF > x/map |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
592 > default = 'shortlog' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
593 > shortlog = 'access to outside of templates directory\n' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
594 > mimetype = 'text/plain' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
595 > EOF |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
596 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
597 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
598 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log \ |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
599 > --config web.style=fallback --config web.templates=x/templates |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
600 $ cat hg.pid >> $DAEMON_PIDS |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
601 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
602 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "?style=`pwd`/x" |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
603 200 Script output follows |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
604 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
605 fall back to default |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
606 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
607 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=..' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
608 200 Script output follows |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
609 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
610 fall back to default |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
611 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
612 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=./..' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
613 200 Script output follows |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
614 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
615 fall back to default |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
616 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
617 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=.../.../' |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
618 200 Script output follows |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
619 |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
620 fall back to default |
b73a22d1d9bf
hgweb: prevent loading style map from directories other than specified paths
Yuya Nishihara <yuya@tcha.org>
parents:
23952
diff
changeset
|
621 |
12432 | 622 errors |
5690
1b365c5723bc
server: append to logfiles
Mirko Friedenhagen <mirko-lists@friedenhagen.de>
parents:
5580
diff
changeset
|
623 |
12432 | 624 $ cat errors.log |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15446
diff
changeset
|
625 |
23409
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
626 Uncaught exceptions result in a logged error and canned HTTP response |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
627 |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
628 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
629 $ hg --config extensions.hgweberror=$TESTDIR/hgweberror.py serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
630 $ cat hg.pid >> $DAEMON_PIDS |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
631 |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
632 $ $TESTDIR/get-with-headers.py localhost:$HGPORT 'raiseerror' transfer-encoding content-type |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
633 500 Internal Server Error |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
634 transfer-encoding: chunked |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
635 |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
636 Internal Server Error (no-eol) |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
637 [1] |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
638 |
23952
ea61e278ae92
test-hgweb: fix shutdown race
Matt Mackall <mpm@selenic.com>
parents:
23744
diff
changeset
|
639 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
23409
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
640 $ head -1 errors.log |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
641 .* Exception happened during processing request '/raiseerror': (re) |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
642 |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
643 Uncaught exception after partial content sent |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
644 |
23952
ea61e278ae92
test-hgweb: fix shutdown race
Matt Mackall <mpm@selenic.com>
parents:
23744
diff
changeset
|
645 $ hg --config extensions.hgweberror=$TESTDIR/hgweberror.py serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
ea61e278ae92
test-hgweb: fix shutdown race
Matt Mackall <mpm@selenic.com>
parents:
23744
diff
changeset
|
646 $ cat hg.pid >> $DAEMON_PIDS |
23409
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
647 $ $TESTDIR/get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
648 200 Script output follows |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
649 transfer-encoding: chunked |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
650 content-type: text/plain |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
651 |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
652 partial content |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
653 Internal Server Error (no-eol) |
dc4d2cd3aa3e
hgweb: send proper HTTP response after uncaught exception
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22947
diff
changeset
|
654 |
23952
ea61e278ae92
test-hgweb: fix shutdown race
Matt Mackall <mpm@selenic.com>
parents:
23744
diff
changeset
|
655 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15446
diff
changeset
|
656 $ cd .. |