Mercurial > hg
comparison tests/test-log.t @ 51144:9ff3d5395d6b
templatekw: fix inconsistency of diffstat with diff.merge
Previously, `-T'{diffstat}'` was giving stats from the diff against p1,
regardless of whether `--config diff.merge=yes` is set.
This was inconsistent with `log --patch` which is aware of that option.
author | pacien <pacien.trangirard@pacien.net> |
---|---|
date | Tue, 14 Nov 2023 22:47:17 +0100 |
parents | f3cd2d6eeef9 |
children |
comparison
equal
deleted
inserted
replaced
51143:d6e5bec550f1 | 51144:9ff3d5395d6b |
---|---|
1999 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1999 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
2000 +++ b/b Thu Jan 01 00:00:00 1970 +0000 | 2000 +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
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) |
2007 | 2009 |
2008 $ hg log -pr 3 --config diff.merge=yes | 2010 $ hg log -pr 3 --config diff.merge=yes |
2019 +++ b/a Thu Jan 01 00:00:00 1970 +0000 | 2021 +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
2020 @@ -1,1 +1,1 @@ | 2022 @@ -1,1 +1,1 @@ |
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 |
2027 | 2032 |
2028 $ hg init simplelog | 2033 $ hg init simplelog |