diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py --- a/mercurial/logcmdutil.py +++ b/mercurial/logcmdutil.py @@ -247,7 +247,7 @@ ui, ctx.repo(), diffopts, - ctx.p1(), + diff_parent(ctx), ctx, match=self._makefilematcher(ctx), stat=stat, diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -11,7 +11,8 @@ * There's a new `diff.merge` config option to show the changes relative to an automerge for merge changesets. This makes it easier to detect and review manual changes performed in merge - changesets. It is only supported by `hg diff --change` so far. + changesets. It is supported by `hg diff --change`, `hg log -p` + `hg incoming -p`, and `hg outgoing -p` so far. == Bug Fixes == diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -1966,6 +1966,26 @@ @@ -0,0 +1,1 @@ +b + +Test that diff.merge is respected (file b was added on one side and +and therefore merged cleanly) + + $ hg log -pr 3 --config diff.merge=yes + changeset: 3:8e07aafe1edc + tag: tip + parent: 2:b09be438c43a + parent: 1:925d80f479bb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: 3 + + diff -r 8e07aafe1edc a + --- a/a Thu Jan 01 00:00:00 1970 +0000 + +++ b/a Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,1 @@ + -b + +c + $ cd .. 'hg log -r rev fn' when last(filelog(fn)) != rev