Show More
@@ -270,7 +270,7 b' def showdiffstat(context, mapping):' | |||||
270 | ui = context.resource(mapping, b'ui') |
|
270 | ui = context.resource(mapping, b'ui') | |
271 | ctx = context.resource(mapping, b'ctx') |
|
271 | ctx = context.resource(mapping, b'ctx') | |
272 | diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) |
|
272 | diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) | |
273 | diff = ctx.diff(opts=diffopts) |
|
273 | diff = ctx.diff(diffutil.diff_parent(ctx), opts=diffopts) | |
274 | stats = patch.diffstatdata(util.iterlines(diff)) |
|
274 | stats = patch.diffstatdata(util.iterlines(diff)) | |
275 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
|
275 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) | |
276 | return b'%d: +%d/-%d' % (len(stats), adds, removes) |
|
276 | return b'%d: +%d/-%d' % (len(stats), adds, removes) |
@@ -2001,6 +2001,8 b' Diff here should be the same:' | |||||
2001 | @@ -0,0 +1,1 @@ |
|
2001 | @@ -0,0 +1,1 @@ | |
2002 | +b |
|
2002 | +b | |
2003 |
|
2003 | |||
|
2004 | $ hg log -r 3 -T'{diffstat}\n' | |||
|
2005 | 2: +2/-1 | |||
2004 |
|
2006 | |||
2005 | Test that diff.merge is respected (file b was added on one side and |
|
2007 | Test that diff.merge is respected (file b was added on one side and | |
2006 | and therefore merged cleanly) |
|
2008 | and therefore merged cleanly) | |
@@ -2021,6 +2023,9 b' and therefore merged cleanly)' | |||||
2021 | -b |
|
2023 | -b | |
2022 | +c |
|
2024 | +c | |
2023 |
|
2025 | |||
|
2026 | $ hg log -r 3 -T'{diffstat}\n' --config diff.merge=yes | |||
|
2027 | 1: +1/-1 | |||
|
2028 | ||||
2024 | $ cd .. |
|
2029 | $ cd .. | |
2025 |
|
2030 | |||
2026 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
2031 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
General Comments 0
You need to be logged in to leave comments.
Login now