##// END OF EJS Templates
hgweb: account for Python 2.4 in one test
Bryan O'Sullivan -
r5564:b4af2dd9 default
parent child Browse files
Show More
@@ -1,31 +1,31 b''
1 1 #!/bin/sh
2 2
3 3 hg init test
4 4 cd test
5 5 mkdir da
6 6 echo foo > da/foo
7 7 echo foo > foo
8 8 hg ci -Ambase -d '0 0'
9 9 hg serve -p $HGPORT -d --pid-file=hg.pid
10 10 cat hg.pid >> $DAEMON_PIDS
11 11 echo % manifest
12 12 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
13 13 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
14 14
15 15 echo % plain file
16 16 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
17 17
18 18 echo % should give a 404 - static file that does not exist
19 19 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
20 20
21 21 echo % should give a 404 - bad revision
22 22 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
23 23
24 24 echo % should give a 400 - bad command
25 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw'
25 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' | sed 's/400.*/400/'
26 26
27 27 echo % should give a 404 - file does not exist
28 28 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
29 29
30 30 echo % static file
31 31 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'
@@ -1,136 +1,136 b''
1 1 adding da/foo
2 2 adding foo
3 3 % manifest
4 4 200 Script output follows
5 5
6 6
7 7 drwxr-xr-x da
8 8 -rw-r--r-- 4 foo
9 9
10 10
11 11 200 Script output follows
12 12
13 13
14 14 -rw-r--r-- 4 foo
15 15
16 16
17 17 % plain file
18 18 200 Script output follows
19 19
20 20 foo
21 21 % should give a 404 - static file that does not exist
22 22 404 Not Found
23 23
24 24 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
25 25 <html>
26 26 <head>
27 27 <link rel="icon" href="/static/hgicon.png" type="image/png">
28 28 <meta name="robots" content="index, nofollow" />
29 29 <link rel="stylesheet" href="/static/style.css" type="text/css" />
30 30
31 31 <title>Mercurial Error</title>
32 32 </head>
33 33 <body>
34 34
35 35 <h2>Mercurial Error</h2>
36 36
37 37 <p>
38 38 An error occured while processing your request:
39 39 </p>
40 40 <p>
41 41 Not Found
42 42 </p>
43 43
44 44
45 45 <div class="logo">
46 46 powered by<br/>
47 47 <a href="http://www.selenic.com/mercurial/">mercurial</a>
48 48 </div>
49 49
50 50 </body>
51 51 </html>
52 52
53 53 % should give a 404 - bad revision
54 54 404 Not Found
55 55
56 56
57 57 error: revision not found: spam
58 58 % should give a 400 - bad command
59 400 Bad Request
59 400
60 60
61 61
62 62 error: No such method: spam
63 63 % should give a 404 - file does not exist
64 64 404 Not Found
65 65
66 66
67 67 error: Path not found: bork/
68 68 % static file
69 69 200 Script output follows
70 70
71 71 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
72 72 a { color:#0000cc; }
73 73 a:hover, a:visited, a:active { color:#880000; }
74 74 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
75 75 div.page_header a:visited { color:#0000cc; }
76 76 div.page_header a:hover { color:#880000; }
77 77 div.page_nav { padding:8px; }
78 78 div.page_nav a:visited { color:#0000cc; }
79 79 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
80 80 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
81 81 div.page_footer_text { float:left; color:#555555; font-style:italic; }
82 82 div.page_body { padding:8px; }
83 83 div.title, a.title {
84 84 display:block; padding:6px 8px;
85 85 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
86 86 }
87 87 a.title:hover { background-color: #d9d8d1; }
88 88 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
89 89 div.log_body { padding:8px 8px 8px 150px; }
90 90 .age { white-space:nowrap; }
91 91 span.age { position:relative; float:left; width:142px; font-style:italic; }
92 92 div.log_link {
93 93 padding:0px 8px;
94 94 font-size:10px; font-family:sans-serif; font-style:normal;
95 95 position:relative; float:left; width:136px;
96 96 }
97 97 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
98 98 a.list { text-decoration:none; color:#000000; }
99 99 a.list:hover { text-decoration:underline; color:#880000; }
100 100 table { padding:8px 4px; }
101 101 th { padding:2px 5px; font-size:12px; text-align:left; }
102 102 tr.light:hover, .parity0:hover { background-color:#edece6; }
103 103 tr.dark, .parity1 { background-color:#f6f6f0; }
104 104 tr.dark:hover, .parity1:hover { background-color:#edece6; }
105 105 td { padding:2px 5px; font-size:12px; vertical-align:top; }
106 106 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
107 107 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
108 108 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
109 109 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
110 110 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
111 111 .linenr { color:#999999; text-decoration:none }
112 112 a.rss_logo {
113 113 float:right; padding:3px 0px; width:35px; line-height:10px;
114 114 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
115 115 color:#ffffff; background-color:#ff6600;
116 116 font-weight:bold; font-family:sans-serif; font-size:10px;
117 117 text-align:center; text-decoration:none;
118 118 }
119 119 a.rss_logo:hover { background-color:#ee5500; }
120 120 pre { margin: 0; }
121 121 span.logtags span {
122 122 padding: 0px 4px;
123 123 font-size: 10px;
124 124 font-weight: normal;
125 125 border: 1px solid;
126 126 background-color: #ffaaff;
127 127 border-color: #ffccff #ff00ee #ff00ee #ffccff;
128 128 }
129 129 span.logtags span.tagtag {
130 130 background-color: #ffffaa;
131 131 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
132 132 }
133 133 span.logtags span.branchtag {
134 134 background-color: #aaffaa;
135 135 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
136 136 }
General Comments 0
You need to be logged in to leave comments. Login now