Show More
@@ -1,602 +1,615 | |||
|
1 |
$ "$TESTDIR/hghave" serve |
|
|
1 | $ "$TESTDIR/hghave" serve || exit 80 | |
|
2 | 2 | |
|
3 | 3 | setting up repo |
|
4 | 4 | |
|
5 | 5 | $ hg init test |
|
6 | 6 | $ cd test |
|
7 | 7 | $ echo a > a |
|
8 | 8 | $ echo b > b |
|
9 | 9 | $ hg ci -Ama |
|
10 | 10 | adding a |
|
11 | 11 | adding b |
|
12 | 12 | |
|
13 | 13 | change permissions for git diffs |
|
14 | 14 | |
|
15 | $ chmod +x a | |
|
16 | $ hg rm b | |
|
17 | $ hg ci -Amb | |
|
15 | $ hg import -q --bypass - <<EOF | |
|
16 | > # HG changeset patch | |
|
17 | > # User test | |
|
18 | > # Date 0 0 | |
|
19 | > b | |
|
20 | > | |
|
21 | > diff --git a/a b/a | |
|
22 | > old mode 100644 | |
|
23 | > new mode 100755 | |
|
24 | > diff --git a/b b/b | |
|
25 | > deleted file mode 100644 | |
|
26 | > --- a/b | |
|
27 | > +++ /dev/null | |
|
28 | > @@ -1,1 +0,0 @@ | |
|
29 | > -b | |
|
30 | > EOF | |
|
18 | 31 | |
|
19 | 32 | set up hgweb |
|
20 | 33 | |
|
21 | 34 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
22 | 35 | $ cat hg.pid >> $DAEMON_PIDS |
|
23 | 36 | |
|
24 | 37 | revision |
|
25 | 38 | |
|
26 | 39 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' |
|
27 | 40 | 200 Script output follows |
|
28 | 41 | |
|
29 | 42 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
30 | 43 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
31 | 44 | <head> |
|
32 | 45 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
33 | 46 | <meta name="robots" content="index, nofollow" /> |
|
34 | 47 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
35 | 48 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
36 | 49 | |
|
37 | 50 | <title>test: 0cd96de13884</title> |
|
38 | 51 | </head> |
|
39 | 52 | <body> |
|
40 | 53 | <div class="container"> |
|
41 | 54 | <div class="menu"> |
|
42 | 55 | <div class="logo"> |
|
43 | 56 | <a href="http://mercurial.selenic.com/"> |
|
44 | 57 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
45 | 58 | </div> |
|
46 | 59 | <ul> |
|
47 | 60 | <li><a href="/shortlog/0cd96de13884">log</a></li> |
|
48 | 61 | <li><a href="/graph/0cd96de13884">graph</a></li> |
|
49 | 62 | <li><a href="/tags">tags</a></li> |
|
50 | 63 | <li><a href="/bookmarks">bookmarks</a></li> |
|
51 | 64 | <li><a href="/branches">branches</a></li> |
|
52 | 65 | </ul> |
|
53 | 66 | <ul> |
|
54 | 67 | <li class="active">changeset</li> |
|
55 | 68 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> |
|
56 | 69 | <li><a href="/file/0cd96de13884">browse</a></li> |
|
57 | 70 | </ul> |
|
58 | 71 | <ul> |
|
59 | 72 | |
|
60 | 73 | </ul> |
|
61 | 74 | <ul> |
|
62 | 75 | <li><a href="/help">help</a></li> |
|
63 | 76 | </ul> |
|
64 | 77 | </div> |
|
65 | 78 | |
|
66 | 79 | <div class="main"> |
|
67 | 80 | |
|
68 | 81 | <h2><a href="/">test</a></h2> |
|
69 | 82 | <h3>changeset 0:0cd96de13884 </h3> |
|
70 | 83 | |
|
71 | 84 | <form class="search" action="/log"> |
|
72 | 85 | |
|
73 | 86 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
74 | 87 | <div id="hint">find changesets by author, revision, |
|
75 | 88 | files, or words in the commit message</div> |
|
76 | 89 | </form> |
|
77 | 90 | |
|
78 | 91 | <div class="description">a</div> |
|
79 | 92 | |
|
80 | 93 | <table id="changesetEntry"> |
|
81 | 94 | <tr> |
|
82 | 95 | <th class="author">author</th> |
|
83 | 96 | <td class="author">test</td> |
|
84 | 97 | </tr> |
|
85 | 98 | <tr> |
|
86 | 99 | <th class="date">date</th> |
|
87 | 100 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> |
|
88 | 101 | <tr> |
|
89 | 102 | <th class="author">parents</th> |
|
90 | 103 | <td class="author"></td> |
|
91 | 104 | </tr> |
|
92 | 105 | <tr> |
|
93 | 106 | <th class="author">children</th> |
|
94 | 107 | <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td> |
|
95 | 108 | </tr> |
|
96 | 109 | <tr> |
|
97 | 110 | <th class="files">files</th> |
|
98 | 111 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> |
|
99 | 112 | </tr> |
|
100 | 113 | <tr> |
|
101 | 114 | <th class="diffstat">diffstat</th> |
|
102 | 115 | <td class="diffstat"> |
|
103 | 116 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
104 | 117 | |
|
105 | 118 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> |
|
106 | 119 | <div id="diffstatdetails" style="display:none;"> |
|
107 | 120 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> |
|
108 | 121 | <p> |
|
109 | 122 | <table> <tr class="parity0"> |
|
110 | 123 | <td class="diffstat-file"><a href="#l1.1">a</a></td> |
|
111 | 124 | <td class="diffstat-total" align="right">1</td> |
|
112 | 125 | <td class="diffstat-graph"> |
|
113 | 126 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
114 | 127 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
115 | 128 | </td> |
|
116 | 129 | </tr> |
|
117 | 130 | <tr class="parity1"> |
|
118 | 131 | <td class="diffstat-file"><a href="#l2.1">b</a></td> |
|
119 | 132 | <td class="diffstat-total" align="right">1</td> |
|
120 | 133 | <td class="diffstat-graph"> |
|
121 | 134 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
122 | 135 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
123 | 136 | </td> |
|
124 | 137 | </tr> |
|
125 | 138 | </table> |
|
126 | 139 | </div> |
|
127 | 140 | </td> |
|
128 | 141 | </tr> |
|
129 | 142 | </table> |
|
130 | 143 | |
|
131 | 144 | <div class="overflow"> |
|
132 | 145 | <div class="sourcefirst"> line diff</div> |
|
133 | 146 | |
|
134 | 147 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
135 | 148 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
136 | 149 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
137 | 150 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a |
|
138 | 151 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
139 | 152 | </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
140 | 153 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
141 | 154 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b |
|
142 | 155 | </span></pre></div> |
|
143 | 156 | </div> |
|
144 | 157 | |
|
145 | 158 | </div> |
|
146 | 159 | </div> |
|
147 | 160 | <script type="text/javascript">process_dates()</script> |
|
148 | 161 | |
|
149 | 162 | |
|
150 | 163 | </body> |
|
151 | 164 | </html> |
|
152 | 165 | |
|
153 | 166 | |
|
154 | 167 | raw revision |
|
155 | 168 | |
|
156 | 169 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' |
|
157 | 170 | 200 Script output follows |
|
158 | 171 | |
|
159 | 172 | |
|
160 | 173 | # HG changeset patch |
|
161 | 174 | # User test |
|
162 | 175 | # Date 0 0 |
|
163 | 176 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e |
|
164 | 177 | |
|
165 | 178 | a |
|
166 | 179 | |
|
167 | 180 | diff -r 000000000000 -r 0cd96de13884 a |
|
168 | 181 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
169 | 182 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
170 | 183 | @@ -0,0 +1,1 @@ |
|
171 | 184 | +a |
|
172 | 185 | diff -r 000000000000 -r 0cd96de13884 b |
|
173 | 186 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
174 | 187 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
175 | 188 | @@ -0,0 +1,1 @@ |
|
176 | 189 | +b |
|
177 | 190 | |
|
178 | 191 | |
|
179 | 192 | diff removed file |
|
180 | 193 | |
|
181 | 194 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/b' |
|
182 | 195 | 200 Script output follows |
|
183 | 196 | |
|
184 | 197 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
185 | 198 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
186 | 199 | <head> |
|
187 | 200 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
188 | 201 | <meta name="robots" content="index, nofollow" /> |
|
189 | 202 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
190 | 203 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
191 | 204 | |
|
192 | 205 | <title>test: b diff</title> |
|
193 | 206 | </head> |
|
194 | 207 | <body> |
|
195 | 208 | |
|
196 | 209 | <div class="container"> |
|
197 | 210 | <div class="menu"> |
|
198 | 211 | <div class="logo"> |
|
199 | 212 | <a href="http://mercurial.selenic.com/"> |
|
200 | 213 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
201 | 214 | </div> |
|
202 | 215 | <ul> |
|
203 | 216 | <li><a href="/shortlog/559edbd9ed20">log</a></li> |
|
204 | 217 | <li><a href="/graph/559edbd9ed20">graph</a></li> |
|
205 | 218 | <li><a href="/tags">tags</a></li> |
|
206 | 219 | <li><a href="/bookmarks">bookmarks</a></li> |
|
207 | 220 | <li><a href="/branches">branches</a></li> |
|
208 | 221 | </ul> |
|
209 | 222 | <ul> |
|
210 | 223 | <li><a href="/rev/559edbd9ed20">changeset</a></li> |
|
211 | 224 | <li><a href="/file/559edbd9ed20">browse</a></li> |
|
212 | 225 | </ul> |
|
213 | 226 | <ul> |
|
214 | 227 | <li><a href="/file/559edbd9ed20/b">file</a></li> |
|
215 | 228 | <li><a href="/file/tip/b">latest</a></li> |
|
216 | 229 | <li class="active">diff</li> |
|
217 | 230 | <li><a href="/annotate/559edbd9ed20/b">annotate</a></li> |
|
218 | 231 | <li><a href="/log/559edbd9ed20/b">file log</a></li> |
|
219 | 232 | <li><a href="/raw-file/559edbd9ed20/b">raw</a></li> |
|
220 | 233 | </ul> |
|
221 | 234 | <ul> |
|
222 | 235 | <li><a href="/help">help</a></li> |
|
223 | 236 | </ul> |
|
224 | 237 | </div> |
|
225 | 238 | |
|
226 | 239 | <div class="main"> |
|
227 | 240 | <h2><a href="/">test</a></h2> |
|
228 | 241 | <h3>diff b @ 1:559edbd9ed20</h3> |
|
229 | 242 | |
|
230 | 243 | <form class="search" action="/log"> |
|
231 | 244 | <p></p> |
|
232 | 245 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
233 | 246 | <div id="hint">find changesets by author, revision, |
|
234 | 247 | files, or words in the commit message</div> |
|
235 | 248 | </form> |
|
236 | 249 | |
|
237 | 250 | <div class="description">b</div> |
|
238 | 251 | |
|
239 | 252 | <table id="changesetEntry"> |
|
240 | 253 | <tr> |
|
241 | 254 | <th>author</th> |
|
242 | 255 | <td>test</td> |
|
243 | 256 | </tr> |
|
244 | 257 | <tr> |
|
245 | 258 | <th>date</th> |
|
246 | 259 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
|
247 | 260 | </tr> |
|
248 | 261 | <tr> |
|
249 | 262 | <th>parents</th> |
|
250 | 263 | <td><a href="/file/0cd96de13884/b">0cd96de13884</a> </td> |
|
251 | 264 | </tr> |
|
252 | 265 | <tr> |
|
253 | 266 | <th>children</th> |
|
254 | 267 | <td></td> |
|
255 | 268 | </tr> |
|
256 | 269 | |
|
257 | 270 | </table> |
|
258 | 271 | |
|
259 | 272 | <div class="overflow"> |
|
260 | 273 | <div class="sourcefirst"> line diff</div> |
|
261 | 274 | |
|
262 | 275 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/b Thu Jan 01 00:00:00 1970 +0000 |
|
263 | 276 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
264 | 277 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@ |
|
265 | 278 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-b |
|
266 | 279 | </span></pre></div> |
|
267 | 280 | </div> |
|
268 | 281 | </div> |
|
269 | 282 | </div> |
|
270 | 283 | |
|
271 | 284 | <script type="text/javascript">process_dates()</script> |
|
272 | 285 | |
|
273 | 286 | |
|
274 | 287 | </body> |
|
275 | 288 | </html> |
|
276 | 289 | |
|
277 | 290 | |
|
278 | 291 | set up hgweb with git diffs |
|
279 | 292 | |
|
280 | 293 | $ "$TESTDIR/killdaemons.py" |
|
281 | 294 | $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
282 | 295 | $ cat hg.pid >> $DAEMON_PIDS |
|
283 | 296 | |
|
284 | 297 | revision |
|
285 | 298 | |
|
286 | 299 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' |
|
287 | 300 | 200 Script output follows |
|
288 | 301 | |
|
289 | 302 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
290 | 303 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
291 | 304 | <head> |
|
292 | 305 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
293 | 306 | <meta name="robots" content="index, nofollow" /> |
|
294 | 307 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
295 | 308 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
296 | 309 | |
|
297 | 310 | <title>test: 0cd96de13884</title> |
|
298 | 311 | </head> |
|
299 | 312 | <body> |
|
300 | 313 | <div class="container"> |
|
301 | 314 | <div class="menu"> |
|
302 | 315 | <div class="logo"> |
|
303 | 316 | <a href="http://mercurial.selenic.com/"> |
|
304 | 317 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
305 | 318 | </div> |
|
306 | 319 | <ul> |
|
307 | 320 | <li><a href="/shortlog/0cd96de13884">log</a></li> |
|
308 | 321 | <li><a href="/graph/0cd96de13884">graph</a></li> |
|
309 | 322 | <li><a href="/tags">tags</a></li> |
|
310 | 323 | <li><a href="/bookmarks">bookmarks</a></li> |
|
311 | 324 | <li><a href="/branches">branches</a></li> |
|
312 | 325 | </ul> |
|
313 | 326 | <ul> |
|
314 | 327 | <li class="active">changeset</li> |
|
315 | 328 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> |
|
316 | 329 | <li><a href="/file/0cd96de13884">browse</a></li> |
|
317 | 330 | </ul> |
|
318 | 331 | <ul> |
|
319 | 332 | |
|
320 | 333 | </ul> |
|
321 | 334 | <ul> |
|
322 | 335 | <li><a href="/help">help</a></li> |
|
323 | 336 | </ul> |
|
324 | 337 | </div> |
|
325 | 338 | |
|
326 | 339 | <div class="main"> |
|
327 | 340 | |
|
328 | 341 | <h2><a href="/">test</a></h2> |
|
329 | 342 | <h3>changeset 0:0cd96de13884 </h3> |
|
330 | 343 | |
|
331 | 344 | <form class="search" action="/log"> |
|
332 | 345 | |
|
333 | 346 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
334 | 347 | <div id="hint">find changesets by author, revision, |
|
335 | 348 | files, or words in the commit message</div> |
|
336 | 349 | </form> |
|
337 | 350 | |
|
338 | 351 | <div class="description">a</div> |
|
339 | 352 | |
|
340 | 353 | <table id="changesetEntry"> |
|
341 | 354 | <tr> |
|
342 | 355 | <th class="author">author</th> |
|
343 | 356 | <td class="author">test</td> |
|
344 | 357 | </tr> |
|
345 | 358 | <tr> |
|
346 | 359 | <th class="date">date</th> |
|
347 | 360 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> |
|
348 | 361 | <tr> |
|
349 | 362 | <th class="author">parents</th> |
|
350 | 363 | <td class="author"></td> |
|
351 | 364 | </tr> |
|
352 | 365 | <tr> |
|
353 | 366 | <th class="author">children</th> |
|
354 | 367 | <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td> |
|
355 | 368 | </tr> |
|
356 | 369 | <tr> |
|
357 | 370 | <th class="files">files</th> |
|
358 | 371 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> |
|
359 | 372 | </tr> |
|
360 | 373 | <tr> |
|
361 | 374 | <th class="diffstat">diffstat</th> |
|
362 | 375 | <td class="diffstat"> |
|
363 | 376 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
364 | 377 | |
|
365 | 378 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> |
|
366 | 379 | <div id="diffstatdetails" style="display:none;"> |
|
367 | 380 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> |
|
368 | 381 | <p> |
|
369 | 382 | <table> <tr class="parity0"> |
|
370 | 383 | <td class="diffstat-file"><a href="#l1.1">a</a></td> |
|
371 | 384 | <td class="diffstat-total" align="right">1</td> |
|
372 | 385 | <td class="diffstat-graph"> |
|
373 | 386 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
374 | 387 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
375 | 388 | </td> |
|
376 | 389 | </tr> |
|
377 | 390 | <tr class="parity1"> |
|
378 | 391 | <td class="diffstat-file"><a href="#l2.1">b</a></td> |
|
379 | 392 | <td class="diffstat-total" align="right">1</td> |
|
380 | 393 | <td class="diffstat-graph"> |
|
381 | 394 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
382 | 395 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
383 | 396 | </td> |
|
384 | 397 | </tr> |
|
385 | 398 | </table> |
|
386 | 399 | </div> |
|
387 | 400 | </td> |
|
388 | 401 | </tr> |
|
389 | 402 | </table> |
|
390 | 403 | |
|
391 | 404 | <div class="overflow"> |
|
392 | 405 | <div class="sourcefirst"> line diff</div> |
|
393 | 406 | |
|
394 | 407 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644 |
|
395 | 408 | <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null |
|
396 | 409 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a |
|
397 | 410 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
398 | 411 | </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a |
|
399 | 412 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644 |
|
400 | 413 | <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null |
|
401 | 414 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b |
|
402 | 415 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
403 | 416 | </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b |
|
404 | 417 | </span></pre></div> |
|
405 | 418 | </div> |
|
406 | 419 | |
|
407 | 420 | </div> |
|
408 | 421 | </div> |
|
409 | 422 | <script type="text/javascript">process_dates()</script> |
|
410 | 423 | |
|
411 | 424 | |
|
412 | 425 | </body> |
|
413 | 426 | </html> |
|
414 | 427 | |
|
415 | 428 | |
|
416 | 429 | revision |
|
417 | 430 | |
|
418 | 431 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' |
|
419 | 432 | 200 Script output follows |
|
420 | 433 | |
|
421 | 434 | |
|
422 | 435 | # HG changeset patch |
|
423 | 436 | # User test |
|
424 | 437 | # Date 0 0 |
|
425 | 438 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e |
|
426 | 439 | |
|
427 | 440 | a |
|
428 | 441 | |
|
429 | 442 | diff --git a/a b/a |
|
430 | 443 | new file mode 100644 |
|
431 | 444 | --- /dev/null |
|
432 | 445 | +++ b/a |
|
433 | 446 | @@ -0,0 +1,1 @@ |
|
434 | 447 | +a |
|
435 | 448 | diff --git a/b b/b |
|
436 | 449 | new file mode 100644 |
|
437 | 450 | --- /dev/null |
|
438 | 451 | +++ b/b |
|
439 | 452 | @@ -0,0 +1,1 @@ |
|
440 | 453 | +b |
|
441 | 454 | |
|
442 | 455 | |
|
443 | 456 | diff removed file |
|
444 | 457 | |
|
445 | 458 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a' |
|
446 | 459 | 200 Script output follows |
|
447 | 460 | |
|
448 | 461 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
449 | 462 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
450 | 463 | <head> |
|
451 | 464 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
452 | 465 | <meta name="robots" content="index, nofollow" /> |
|
453 | 466 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
454 | 467 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
455 | 468 | |
|
456 | 469 | <title>test: a diff</title> |
|
457 | 470 | </head> |
|
458 | 471 | <body> |
|
459 | 472 | |
|
460 | 473 | <div class="container"> |
|
461 | 474 | <div class="menu"> |
|
462 | 475 | <div class="logo"> |
|
463 | 476 | <a href="http://mercurial.selenic.com/"> |
|
464 | 477 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
465 | 478 | </div> |
|
466 | 479 | <ul> |
|
467 | 480 | <li><a href="/shortlog/559edbd9ed20">log</a></li> |
|
468 | 481 | <li><a href="/graph/559edbd9ed20">graph</a></li> |
|
469 | 482 | <li><a href="/tags">tags</a></li> |
|
470 | 483 | <li><a href="/bookmarks">bookmarks</a></li> |
|
471 | 484 | <li><a href="/branches">branches</a></li> |
|
472 | 485 | </ul> |
|
473 | 486 | <ul> |
|
474 | 487 | <li><a href="/rev/559edbd9ed20">changeset</a></li> |
|
475 | 488 | <li><a href="/file/559edbd9ed20">browse</a></li> |
|
476 | 489 | </ul> |
|
477 | 490 | <ul> |
|
478 | 491 | <li><a href="/file/559edbd9ed20/a">file</a></li> |
|
479 | 492 | <li><a href="/file/tip/a">latest</a></li> |
|
480 | 493 | <li class="active">diff</li> |
|
481 | 494 | <li><a href="/annotate/559edbd9ed20/a">annotate</a></li> |
|
482 | 495 | <li><a href="/log/559edbd9ed20/a">file log</a></li> |
|
483 | 496 | <li><a href="/raw-file/559edbd9ed20/a">raw</a></li> |
|
484 | 497 | </ul> |
|
485 | 498 | <ul> |
|
486 | 499 | <li><a href="/help">help</a></li> |
|
487 | 500 | </ul> |
|
488 | 501 | </div> |
|
489 | 502 | |
|
490 | 503 | <div class="main"> |
|
491 | 504 | <h2><a href="/">test</a></h2> |
|
492 | 505 | <h3>diff a @ 1:559edbd9ed20</h3> |
|
493 | 506 | |
|
494 | 507 | <form class="search" action="/log"> |
|
495 | 508 | <p></p> |
|
496 | 509 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
497 | 510 | <div id="hint">find changesets by author, revision, |
|
498 | 511 | files, or words in the commit message</div> |
|
499 | 512 | </form> |
|
500 | 513 | |
|
501 | 514 | <div class="description">b</div> |
|
502 | 515 | |
|
503 | 516 | <table id="changesetEntry"> |
|
504 | 517 | <tr> |
|
505 | 518 | <th>author</th> |
|
506 | 519 | <td>test</td> |
|
507 | 520 | </tr> |
|
508 | 521 | <tr> |
|
509 | 522 | <th>date</th> |
|
510 | 523 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
|
511 | 524 | </tr> |
|
512 | 525 | <tr> |
|
513 | 526 | <th>parents</th> |
|
514 | 527 | <td></td> |
|
515 | 528 | </tr> |
|
516 | 529 | <tr> |
|
517 | 530 | <th>children</th> |
|
518 | 531 | <td></td> |
|
519 | 532 | </tr> |
|
520 | 533 | |
|
521 | 534 | </table> |
|
522 | 535 | |
|
523 | 536 | <div class="overflow"> |
|
524 | 537 | <div class="sourcefirst"> line diff</div> |
|
525 | 538 | |
|
526 | 539 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> old mode 100644 |
|
527 | 540 | <a href="#l1.2" id="l1.2"> 1.2</a> new mode 100755 |
|
528 | 541 | </pre></div> |
|
529 | 542 | </div> |
|
530 | 543 | </div> |
|
531 | 544 | </div> |
|
532 | 545 | |
|
533 | 546 | <script type="text/javascript">process_dates()</script> |
|
534 | 547 | |
|
535 | 548 | |
|
536 | 549 | </body> |
|
537 | 550 | </html> |
|
538 | 551 | |
|
539 | 552 | $ cd .. |
|
540 | 553 | |
|
541 | 554 | test import rev as raw-rev |
|
542 | 555 | |
|
543 | 556 | $ hg clone -r0 test test1 |
|
544 | 557 | adding changesets |
|
545 | 558 | adding manifests |
|
546 | 559 | adding file changes |
|
547 | 560 | added 1 changesets with 2 changes to 2 files |
|
548 | 561 | updating to branch default |
|
549 | 562 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
550 | 563 | $ cd test1 |
|
551 | $ hg import -q --exact http://localhost:$HGPORT/rev/1 | |
|
564 | $ hg import -q --bypass --exact http://localhost:$HGPORT/rev/1 | |
|
552 | 565 | |
|
553 | 566 | raw revision with diff block numbers |
|
554 | 567 | |
|
555 | 568 | $ "$TESTDIR/killdaemons.py" |
|
556 | 569 | $ cat <<EOF > .hg/hgrc |
|
557 | 570 | > [web] |
|
558 | 571 | > templates = rawdiff |
|
559 | 572 | > EOF |
|
560 | 573 | $ mkdir rawdiff |
|
561 | 574 | $ cat <<EOF > rawdiff/map |
|
562 | 575 | > mimetype = 'text/plain; charset={encoding}' |
|
563 | 576 | > changeset = '{diff}' |
|
564 | 577 | > difflineplus = '{line}' |
|
565 | 578 | > difflineminus = '{line}' |
|
566 | 579 | > difflineat = '{line}' |
|
567 | 580 | > diffline = '{line}' |
|
568 | 581 | > filenodelink = '' |
|
569 | 582 | > filenolink = '' |
|
570 | 583 | > fileline = '{line}' |
|
571 | 584 | > diffblock = 'Block: {blockno}\n{lines}\n' |
|
572 | 585 | > EOF |
|
573 | 586 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
574 | 587 | $ cat hg.pid >> $DAEMON_PIDS |
|
575 | 588 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' |
|
576 | 589 | 200 Script output follows |
|
577 | 590 | |
|
578 | 591 | Block: 1 |
|
579 | 592 | diff -r 000000000000 -r 0cd96de13884 a |
|
580 | 593 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
581 | 594 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
582 | 595 | @@ -0,0 +1,1 @@ |
|
583 | 596 | +a |
|
584 | 597 | |
|
585 | 598 | Block: 2 |
|
586 | 599 | diff -r 000000000000 -r 0cd96de13884 b |
|
587 | 600 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
588 | 601 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
589 | 602 | @@ -0,0 +1,1 @@ |
|
590 | 603 | +b |
|
591 | 604 | |
|
592 | 605 | $ "$TESTDIR/killdaemons.py" |
|
593 | 606 | $ rm .hg/hgrc rawdiff/map |
|
594 | 607 | $ rmdir rawdiff |
|
595 | 608 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
596 | 609 | $ cat hg.pid >> $DAEMON_PIDS |
|
597 | 610 | |
|
598 | 611 | errors |
|
599 | 612 | |
|
600 | 613 | $ cat ../test/errors.log |
|
601 | 614 | |
|
602 | 615 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now