将文件移动到另一个目录后,我无法再显示两个修订版之间的差异。例如:
hg init
touch a
hg add a
hg ci -m "Added a"
echo "Bli" >> a
hg ci -m "Bli"
echo "Bla" >> a
hg ci -m "Bla"
echo "Blub" >> a
hg ci -m "Blub"
hg diff -r 0 -r 1 a
结果是:
diff -r 8603b08f5a64 -r 16675581549e a
--- a/a Mon Apr 23 09:03:25 2012 +0000
+++ b/a Mon Apr 23 09:03:25 2012 +0000
@@ -0,0 +1,1 @@
+Bli
这是我所期望的。但是,当我现在将文件“a”移动到目录“b”中时:
mkdir b
hg mv a b/a
hg ci -m "Moved a into b"
cd b
hg diff -r 0 -r 1 a
这导致什么都没有(根本没有输出)。我还尝试使用 git Giff 算法:
hg diff --git -r 0 -r 1 a
同样,根本没有输出。日志似乎没问题:
hg log --follow a
结果是:
changeset: 4:cb8185829bfd
tag: tip
user: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
date: Mon Apr 23 09:08:12 2012 +0000
summary: Moved a into b
changeset: 3:4d1ba89885c3
user: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
date: Mon Apr 23 09:03:26 2012 +0000
summary: Blub
changeset: 2:e9126dbb50b2
user: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
date: Mon Apr 23 09:03:26 2012 +0000
summary: Bla
changeset: 1:16675581549e
user: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
date: Mon Apr 23 09:03:25 2012 +0000
summary: Bli
changeset: 0:8603b08f5a64
user: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
date: Mon Apr 23 09:03:25 2012 +0000
summary: Added a
有人知道为什么移动文件后差异不起作用吗?非常感谢您的帮助。