##// END OF EJS Templates
Merge with crew-stable
Martin Geisler -
r9404:4483af16 merge default
parent child Browse files
Show More
@@ -236,7 +236,11 def changeset(web, req, tmpl):
236 parity=parity.next()))
236 parity=parity.next()))
237
237
238 parity = paritygen(web.stripecount)
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 return tmpl('changeset',
244 return tmpl('changeset',
241 diff=diffs,
245 diff=diffs,
242 rev=ctx.rev(),
246 rev=ctx.rev(),
@@ -474,7 +478,11 def filediff(web, req, tmpl):
474 # path already defined in except clause
478 # path already defined in except clause
475
479
476 parity = paritygen(web.stripecount)
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 rename = fctx and webutil.renamelink(fctx) or []
486 rename = fctx and webutil.renamelink(fctx) or []
479 ctx = fctx and fctx or ctx
487 ctx = fctx and fctx or ctx
480 return tmpl("filediff",
488 return tmpl("filediff",
@@ -153,7 +153,7 def listfilediffs(tmpl, files, node, max
153 if len(files) > max:
153 if len(files) > max:
154 yield tmpl('fileellipses')
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 def countgen():
158 def countgen():
159 start = 1
159 start = 1
@@ -195,7 +195,7 def diffs(repo, tmpl, ctx, files, parity
195 yield tmpl('diffblock', parity=parity.next(),
195 yield tmpl('diffblock', parity=parity.next(),
196 lines=prettyprintlines(''.join(block)))
196 lines=prettyprintlines(''.join(block)))
197 block = []
197 block = []
198 if chunk.startswith('diff'):
198 if chunk.startswith('diff') and style != 'raw':
199 chunk = ''.join(chunk.splitlines(True)[1:])
199 chunk = ''.join(chunk.splitlines(True)[1:])
200 block.append(chunk)
200 block.append(chunk)
201 yield tmpl('diffblock', parity=parity.next(),
201 yield tmpl('diffblock', parity=parity.next(),
@@ -337,6 +337,7 200 Script output follows
337 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
337 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
338 Added tag 1.0 for changeset 2ef0ac749a14
338 Added tag 1.0 for changeset 2ef0ac749a14
339
339
340 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
340 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
341 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
341 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
342 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
342 @@ -0,0 +1,1 @@
343 @@ -0,0 +1,1 @@
@@ -451,6 +452,7 files, or words in the commit message</d
451 200 Script output follows
452 200 Script output follows
452
453
453
454
455 diff -r 000000000000 -r a4f92ed23982 foo
454 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
456 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
455 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
457 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
456 @@ -0,0 +1,1 @@
458 @@ -0,0 +1,1 @@
@@ -18,6 +18,9 cat hg.pid >> $DAEMON_PIDS
18 echo % revision
18 echo % revision
19 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
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 echo % diff removed file
24 echo % diff removed file
22 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
25 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
23
26
@@ -29,6 +32,9 cat hg.pid >> $DAEMON_PIDS
29 echo % revision
32 echo % revision
30 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
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 echo % diff removed file
38 echo % diff removed file
33 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
39 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
34
40
@@ -95,6 +95,28 files, or words in the commit message</d
95 </body>
95 </body>
96 </html>
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 % diff removed file
120 % diff removed file
99 200 Script output follows
121 200 Script output follows
100
122
@@ -279,6 +301,30 files, or words in the commit message</d
279 </body>
301 </body>
280 </html>
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 % diff removed file
328 % diff removed file
283 200 Script output follows
329 200 Script output follows
284
330
@@ -359,6 +359,7 200 Script output follows
359 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
359 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
360 xa
360 xa
361
361
362 diff -r bb948857c743 -r cfa68229c116 x/a
362 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
363 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
363 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
364 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
364 @@ -0,0 +1,4 @@
365 @@ -0,0 +1,4 @@
@@ -371,6 +372,7 xa
371 200 Script output follows
372 200 Script output follows
372
373
373
374
375 diff -r ef63ca68695b -r bb948857c743 a
374 --- a/a Thu Jan 01 00:00:00 1970 +0000
376 --- a/a Thu Jan 01 00:00:00 1970 +0000
375 +++ b/a Thu Jan 01 00:00:02 1970 +0000
377 +++ b/a Thu Jan 01 00:00:02 1970 +0000
376 @@ -1,3 +1,4 @@
378 @@ -1,3 +1,4 @@
General Comments 0
You need to be logged in to leave comments. Login now