在修订范围内强制区分多个文件

发布于 2024-09-05 06:41:37 字数 263 浏览 3 评论 0原文

我想在几个修订版中区分一堆行。就像,我想看到从变更列表 X 到变更列表 Y 的 ac、bc 和 cc。

p4 diff2 ac@X ac@Y (其中 X 和 Y 是变更列表编号)似乎有效,但只是有时。具体来说,如果 X 处不存在 ac,我不会得到差异。无论如何,我希望能够获得差异(即使它将是仅添加的整个文件)。

为了获得更大的图片:我有几个文件,跨越多个提交,我想合并这些提交中这些文件的差异,基本上是说“这是这组文件在这组文件中更改的差异变更列表”

I'd like to diff a bunch of lines across several revisions. Like, I'd like to see a.c, b.c, and c.c from changelist X to changelist Y.

p4 diff2 a.c@X a.c@Y (where X & Y are changelist numbers) seems to work, but only sometimes. Specifically, if a.c is non-existent at X, I don't get a diff. I'd like to be able to get the diff (even though it'll be the whole file with only adds) anyways.

To get the bigger picture: I have several files, across several commits, and I'd like to merge the diffs of these files in these commits, to basically say "this is a diff of what changed in this set of files during this set of changelists"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

爱已欠费 2024-09-12 06:41:37

如果我正确理解你的问题,p4 diff -f ... 应该是你的朋友。
来自 p4 帮助:

-f 标志强制对每个文件进行比较,无论是否
它们被打开或者客户端是否有指定的修订版本。
这可用于验证客户端内容。

(请参阅命令行上的 p4 help diff)。

If I understand your problem right, p4 diff -f ... should be your friend.
From the p4-help:

The -f flag forces a diff for every file, regardless of whether
they are opened or if the client has the named revision.
This can be used to verify the client contents.

(see p4 help diff on the command line).

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