Show More
@@ -236,7 +236,11 b' def changeset(web, req, tmpl):' | |||
|
236 | 236 | parity=parity.next())) |
|
237 | 237 | |
|
238 | 238 | parity = paritygen(web.stripecount) |
|
239 | diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity) | |
|
239 | style = web.config('web', 'style', 'paper') | |
|
240 | if 'style' in req.form: | |
|
241 | style = req.form['style'][0] | |
|
242 | ||
|
243 | diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) | |
|
240 | 244 | return tmpl('changeset', |
|
241 | 245 | diff=diffs, |
|
242 | 246 | rev=ctx.rev(), |
@@ -474,7 +478,11 b' def filediff(web, req, tmpl):' | |||
|
474 | 478 | # path already defined in except clause |
|
475 | 479 | |
|
476 | 480 | parity = paritygen(web.stripecount) |
|
477 | diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity) | |
|
481 | style = web.config('web', 'style', 'paper') | |
|
482 | if 'style' in req.form: | |
|
483 | style = req.form['style'][0] | |
|
484 | ||
|
485 | diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity, style) | |
|
478 | 486 | rename = fctx and webutil.renamelink(fctx) or [] |
|
479 | 487 | ctx = fctx and fctx or ctx |
|
480 | 488 | return tmpl("filediff", |
@@ -153,7 +153,7 b' def listfilediffs(tmpl, files, node, max' | |||
|
153 | 153 | if len(files) > max: |
|
154 | 154 | yield tmpl('fileellipses') |
|
155 | 155 | |
|
156 | def diffs(repo, tmpl, ctx, files, parity): | |
|
156 | def diffs(repo, tmpl, ctx, files, parity, style): | |
|
157 | 157 | |
|
158 | 158 | def countgen(): |
|
159 | 159 | start = 1 |
@@ -195,7 +195,7 b' def diffs(repo, tmpl, ctx, files, parity' | |||
|
195 | 195 | yield tmpl('diffblock', parity=parity.next(), |
|
196 | 196 | lines=prettyprintlines(''.join(block))) |
|
197 | 197 | block = [] |
|
198 | if chunk.startswith('diff'): | |
|
198 | if chunk.startswith('diff') and style != 'raw': | |
|
199 | 199 | chunk = ''.join(chunk.splitlines(True)[1:]) |
|
200 | 200 | block.append(chunk) |
|
201 | 201 | yield tmpl('diffblock', parity=parity.next(), |
@@ -337,6 +337,7 b' 200 Script output follows' | |||
|
337 | 337 | # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
|
338 | 338 | Added tag 1.0 for changeset 2ef0ac749a14 |
|
339 | 339 | |
|
340 | diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags | |
|
340 | 341 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
341 | 342 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
342 | 343 | @@ -0,0 +1,1 @@ |
@@ -451,6 +452,7 b' files, or words in the commit message</d' | |||
|
451 | 452 | 200 Script output follows |
|
452 | 453 | |
|
453 | 454 | |
|
455 | diff -r 000000000000 -r a4f92ed23982 foo | |
|
454 | 456 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
455 | 457 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
456 | 458 | @@ -0,0 +1,1 @@ |
@@ -18,6 +18,9 b' cat hg.pid >> $DAEMON_PIDS' | |||
|
18 | 18 | echo % revision |
|
19 | 19 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
|
20 | 20 | |
|
21 | echo % raw revision | |
|
22 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' | |
|
23 | ||
|
21 | 24 | echo % diff removed file |
|
22 | 25 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
|
23 | 26 | |
@@ -29,6 +32,9 b' cat hg.pid >> $DAEMON_PIDS' | |||
|
29 | 32 | echo % revision |
|
30 | 33 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
|
31 | 34 | |
|
35 | echo % revision | |
|
36 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' | |
|
37 | ||
|
32 | 38 | echo % diff removed file |
|
33 | 39 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
|
34 | 40 |
@@ -95,6 +95,28 b' files, or words in the commit message</d' | |||
|
95 | 95 | </body> |
|
96 | 96 | </html> |
|
97 | 97 | |
|
98 | % raw revision | |
|
99 | 200 Script output follows | |
|
100 | ||
|
101 | ||
|
102 | # HG changeset patch | |
|
103 | # User test | |
|
104 | # Date 0 0 | |
|
105 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e | |
|
106 | ||
|
107 | a | |
|
108 | ||
|
109 | diff -r 000000000000 -r 0cd96de13884 a | |
|
110 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
111 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
|
112 | @@ -0,0 +1,1 @@ | |
|
113 | +a | |
|
114 | diff -r 000000000000 -r 0cd96de13884 b | |
|
115 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
116 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
|
117 | @@ -0,0 +1,1 @@ | |
|
118 | +b | |
|
119 | ||
|
98 | 120 | % diff removed file |
|
99 | 121 | 200 Script output follows |
|
100 | 122 | |
@@ -279,6 +301,30 b' files, or words in the commit message</d' | |||
|
279 | 301 | </body> |
|
280 | 302 | </html> |
|
281 | 303 | |
|
304 | % revision | |
|
305 | 200 Script output follows | |
|
306 | ||
|
307 | ||
|
308 | # HG changeset patch | |
|
309 | # User test | |
|
310 | # Date 0 0 | |
|
311 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e | |
|
312 | ||
|
313 | a | |
|
314 | ||
|
315 | diff --git a/a b/a | |
|
316 | new file mode 100644 | |
|
317 | --- /dev/null | |
|
318 | +++ b/a | |
|
319 | @@ -0,0 +1,1 @@ | |
|
320 | +a | |
|
321 | diff --git a/b b/b | |
|
322 | new file mode 100644 | |
|
323 | --- /dev/null | |
|
324 | +++ b/b | |
|
325 | @@ -0,0 +1,1 @@ | |
|
326 | +b | |
|
327 | ||
|
282 | 328 | % diff removed file |
|
283 | 329 | 200 Script output follows |
|
284 | 330 |
@@ -359,6 +359,7 b' 200 Script output follows' | |||
|
359 | 359 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
360 | 360 | xa |
|
361 | 361 | |
|
362 | diff -r bb948857c743 -r cfa68229c116 x/a | |
|
362 | 363 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
363 | 364 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 |
|
364 | 365 | @@ -0,0 +1,4 @@ |
@@ -371,6 +372,7 b' xa' | |||
|
371 | 372 | 200 Script output follows |
|
372 | 373 | |
|
373 | 374 | |
|
375 | diff -r ef63ca68695b -r bb948857c743 a | |
|
374 | 376 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
375 | 377 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
376 | 378 | @@ -1,3 +1,4 @@ |
General Comments 0
You need to be logged in to leave comments.
Login now