Show More
@@ -545,7 +545,8 b' def compare(tmpl, context, leftlines, ri' | |||
|
545 | 545 | def diffstatgen(ctx, basectx): |
|
546 | 546 | '''Generator function that provides the diffstat data.''' |
|
547 | 547 | |
|
548 |
stats = patch.diffstatdata( |
|
|
548 | stats = patch.diffstatdata( | |
|
549 | util.iterlines(ctx.diff(basectx, noprefix=False))) | |
|
549 | 550 | maxname, maxtotal, addtotal, removetotal, binary = patch.diffstatsum(stats) |
|
550 | 551 | while True: |
|
551 | 552 | yield stats, maxname, maxtotal, addtotal, removetotal, binary |
@@ -306,6 +306,23 b' diff removed file' | |||
|
306 | 306 | </html> |
|
307 | 307 | |
|
308 | 308 | |
|
309 | set up hgweb with git diffs + noprefix | |
|
310 | ||
|
311 | $ killdaemons.py | |
|
312 | $ hg serve --config 'diff.git=1' --config 'diff.noprefix=1' -p $HGPORT -d \ | |
|
313 | > --pid-file=hg.pid -A access.log -E errors.log | |
|
314 | $ cat hg.pid >> $DAEMON_PIDS | |
|
315 | ||
|
316 | patch header and diffstat | |
|
317 | ||
|
318 | $ get-with-headers.py localhost:$HGPORT 'rev/0' \ | |
|
319 | > | egrep 'files changed|---|\+\+\+' | |
|
320 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
|
321 | <span id="l1.2" class="minusline">--- /dev/null</span><a href="#l1.2"></a> | |
|
322 | <span id="l1.3" class="plusline">+++ a</span><a href="#l1.3"></a> | |
|
323 | <span id="l2.2" class="minusline">--- /dev/null</span><a href="#l2.2"></a> | |
|
324 | <span id="l2.3" class="plusline">+++ b</span><a href="#l2.3"></a> | |
|
325 | ||
|
309 | 326 | set up hgweb with git diffs |
|
310 | 327 | |
|
311 | 328 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now