[Bug 4221] New: wrong 'hg log --stat' with diff.git=true
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Apr 9 22:18:34 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4221
Priority: normal
Bug ID: 4221
CC: mercurial-devel at selenic.com, natosha at gmail.com
Assignee: bugzilla at selenic.com
Summary: wrong 'hg log --stat' with diff.git=true
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: mkoconnor at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.9.1
Component: largefiles
Product: Mercurial
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 at 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 at 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!
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list