If you copy a file and modify the copy, 'hg log --stat' will incorrectly report that the original was modified instead of the copy. A reproduction: $ hg init test $ cd test $ echo "a\nb\nc" > a $ hg add a $ hg commit -m a $ hg cp a b $ echo d >> b $ hg commit -m b $ hg --config diff.git=true log -r . --stat changeset: 1:4f4a6de064c5 tag: tip user: Michael O'Connor <moconnor@janestreet.com> date: Wed Apr 09 23:08:08 2014 -0400 summary: b a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Note that (at least my version of) diffstat gets this case right: $ hg --config diff.git=true log -r . -p | diffstat b | 1 + 1 file changed, 1 insertion(+) $ diffstat --version diffstat version 1.51 Also, with a move instead of a copy+modification, what --stat reports seems at least strange to me: $ hg update 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg mv a b $ hg commit -m 'mv a b' created new head $ hg --config diff.git=true log -r . --stat changeset: 2:15831134b1bb tag: tip parent: 0:e096287bb74a user: Michael O'Connor <moconnor@janestreet.com> date: Wed Apr 09 23:15:32 2014 -0400 summary: mv a b a | 0 1 files changed, 0 insertions(+), 0 deletions(-) Thanks!
Is this intentionally marked as a largefiles issue? Does it only occur with largefiles enabled?
Sorry, I misclicked. It has nothing to do with largefiles.
Fixed by http://selenic.com/repo/hg/rev/4e2fb0ad00a9 Matt Mackall <mpm@selenic.com> diff: use second filename for --stat reporting on git patches (issue4221) (please test the fix)
Thanks, works for me