Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial(或通常在任何VCS中):在移动的文件中查找差异_Mercurial - Fatal编程技术网

Mercurial(或通常在任何VCS中):在移动的文件中查找差异

Mercurial(或通常在任何VCS中):在移动的文件中查找差异,mercurial,Mercurial,在mercurial中,我感兴趣的旧提交包括将许多文件从一个目录移动到另一个目录。这些文件在某些点上也发生了更改(主要是:因为引用需要更新)。我对这些变化很感兴趣。然而,当我检查差异时(使用“hg export-r REVNO”),我会看到以下形式的内容: diff -r 8cd7ce03f753 -r 98a582c2fca4 oldpath/path/to/file --- a/oldpath/path/to/file Tue Aug 12 15:35:09 2014 +0200

在mercurial中,我感兴趣的旧提交包括将许多文件从一个目录移动到另一个目录。这些文件在某些点上也发生了更改(主要是:因为引用需要更新)。我对这些变化很感兴趣。然而,当我检查差异时(使用“hg export-r REVNO”),我会看到以下形式的内容:

diff -r 8cd7ce03f753 -r 98a582c2fca4 oldpath/path/to/file
--- a/oldpath/path/to/file       Tue Aug 12 15:35:09 2014 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,4 @@
- a lot of stuff
- more stuff
- unchanged stuff
- file continues

... the same for c. 100 other files ...

diff -r 8cd7ce03f753 -r 98a582c2fca4 newpath/path/to/file
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/newpath/path/to/file  Tue Aug 12 16:02:42 2014 +0200
@@ -0,0 +1,4 @@
+ a lot of stuff
+ more stuff
+ changed stuff
+ file continues

... the same for c. 100 other files ...

在上面,可以手动推断“未更改”和“已更改”之间的差异。但是,我希望我的工具能够帮助我,并自动向我展示这种差异。理想情况下,跨提交的所有文件。但是,即使我可以指出一个已经有用的文件(及其重命名版本)。

--git
添加到
hg export
调用。

一点解释可能会有帮助,但为什么不试试呢?尝试什么?我甚至不知道这是什么。您的答案被标记为低质量,这就是为什么我说在hg导出调用中添加一些解释—git并不能神奇地解决我的问题(oldpath/../file和newpath/../file仍然分别显示为完全删除和完全添加),所以,解释一下你为什么认为它应该是好的。然后你的善变行为非常奇怪。对我来说,它只显示了一个常规的差异,就好像文件名一直都是一样的。