为什么 svn diff 不显示常规 diff 显示的文件之间的差异?

发布于 2024-11-16 01:29:01 字数 530 浏览 3 评论 0原文

svn diff 没有发现两个文件之间的差异,而常规 diff 显示差异,是否有原因?我有一个项目,位于供应商第三方库的主干中。我更新了 branch/vendor/lib/current 中的库。在 trunkvendor/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渡你暖光 2024-11-23 01:29:01

执行 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文