Subject: bug#13004: 24.2; vc-diff from vc-log doesn't show diff before renames (for Mercurial backend).

From: Oleksandr Gavenko <[email-masked]>
Date: Tue, 27 Nov 2012 21:27:42 +0200

On 2012-11-26, Glenn Morris wrote:

> A minimal test case starting from scratch would be helpful.
>
> mkdir /tmp/test
> cd /tmp/test
> touch 1
> hg init
> hg add
> hg commit -m "commit 1"
>

  md /tmp/test
  hg init
  echo xxx >>README
  hg add
  hg ci -m init
  echo yyy >>README
  hg ci -m before
  hg mv README INSTALL
  hg ci -m rename
  echo zzz >>INSTALL
  hg ci -m after

Open INSTALL file in Emacs. "C-x v l" ("vc-print-log"). You get (I drop some
output):

  changeset:   3:00cf2a4ab691
  tag:         tip
  files:       INSTALL
  description:
  after

  changeset:   2:c6a81dfaea75
  files:       INSTALL README
  description:
  rename

  changeset:   1:9457c3fba41e
  files:       README
  description:
  before

  changeset:   0:ae606f956f03
  files:       README
  description:
  init

In changeset 3 "d" (log-view-diff) fine:

  diff --git a/INSTALL b/INSTALL
  --- a/INSTALL
  +++ b/INSTALL
  @@ -1,2 +1,3 @@
   xxx
   yyy
  +zzz

In changeset 2 "d" (log-view-diff) fine:

  diff --git a/README b/INSTALL
  copy from README
  copy to INSTALL

In changeset 1 "d" (log-view-diff) fail: empty *vc-diff* buffer and message:

  Finding changes in /tmp/test/INSTALL...
  No changes between 0 and 1

While I run in pure shell:

  $ hg diff -r 1 INSTALL
  diff --git a/README b/INSTALL
  rename from README
  rename to INSTALL
  --- a/README
  +++ b/INSTALL
  @@ -1,2 +1,3 @@
   xxx
   yyy
  +zzz

Also you ask to call:

  $ hg diff -r 1 -r 2 INSTALL
  diff --git a/README b/INSTALL
  copy from README
  copy to INSTALL

-- 
Best regards!