为什么 svn diff 不显示常规 diff 显示的文件之间的差异?
svn diff
没有发现两个文件之间的差异,而常规 diff
显示差异,是否有原因?我有一个项目,位于供应商第三方库的主干中。我更新了 branch/vendor/lib/current
中的库。在 trunk
和 vendor/lib/current
中的 version.php
之间进行 diff
显示
44,45c44,45
< $build = '6218';
< $timestamp = '2011-03-16 03:11pm';
---
> $build = '6354';
> $timestamp = '2011-05-31 03:07pm';
: svn diff
显示没有输出。他们没有共同的“祖先”,但我认为它仍然会显示出差异。有谁知道为什么 svn diff 会这样?
Is there a reason for svn diff
not picking up the differences between two files, whereas regular diff
shows the diff? I have a project, in trunk with vendor third party library. I updated the lib in branch/vendor/lib/current
. Doing a diff
between version.php
in trunk
and vendor/lib/current
shows:
44,45c44,45
< $build = '6218';
< $timestamp = '2011-03-16 03:11pm';
---
> $build = '6354';
> $timestamp = '2011-05-31 03:07pm';
But the same diff with svn diff
shows no ouptut. They do not have shared 'ancestry,' but I would have thought it would still show the diff. Does anyone have any idea of why svn diff
behaves like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行
svn diff 的方式
命令在这里很重要。如果所有目标都是工作副本路径,则默认行为是显示指定的每个文件的任何本地更改,因为这是最常见的用例。如果您想强制 SVN 比较两个 WC 文件,您应该使用 --old 和 --new 标志。但正如您所见,普通的旧
diff
也可以工作。The way that you execute the
svn diff
command is important here. If all targets are working copy paths, then the default behaviour is to show any local changes, for each file specified, because this is the most common use case.If you want to force SVN to compare the two WC files, you should use the --old and --new flags. But plain old
diff
works too, as you've seen.