获取尚未集成到特定分支的变更列表列表

发布于 2024-11-09 06:32:31 字数 427 浏览 3 评论 0原文

如果我有分支 A 和分支 B。分支 B 是从分支 A 分支出来的。我们定期将分支 B 的更改集成回分支 A。是否有 p4 命令用于列出尚未集成到分支 A 的分支 B 变更列表?我可以想到一些原因,鉴于更改列表的文件不一定限于单个分支,这可能是不可能的,但我希望在这里得到最好的结果。

我发现了这个问题: 是否可以列出已集成到工作区的更改列表?

...这与我想要的相反,但明确表明有多种方法可以使用多个命令来执行此操作。我可以想出几种方法来使用多个命令来获得我想要的东西,但在我走这条路之前,我想确保没有简单的方法可以做到这一点。

If I have Branch A and Branch B. Branch B was branched from Branch A. Periodically, we integrate changes from Branch B back into Branch A. Is there a p4 command for listing the Branch B changelists that have not yet been integrated into Branch A? I can think of some reasons that this may not be possible given that a changelist's files is not necessarily limited to a single branch, but I'm hoping for the best here.

I have found this question: Is it possible to list the changelists that have been integrated to a workspace?

... which is the opposite of what, I want but makes it clear that there are ways to do this using multiple commands. I can think of a couple of ways to use multiple commands to get what I want, but before I go down that road I'd like to make sure there's no simple way to do this.

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

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

发布评论

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

评论(2

梦晓ヶ微光ヅ倾城 2024-11-16 06:32:31

您想使用“交换”命令。它目前不受支持(截至版本 10.2),但“p4 help interverss”将为您提供该工具的命令行用法(目前仅在命令行上可用)。我不记得具体是哪个版本引入了这个命令。

p4 interchanges -b mybranch

将报告分支规范定义的未集成的更改。像使用“p4 integ”一样使用“-r”来反转分支映射。如果您没有分支规范,也可以在命令行上给出文件规范:

p4 interchanges //depot/main/... //depot/RelA/...

将报告从 main 到 RelA 的未集成更改

与任何未记录/不受支持的功能一样,您需要小心输出。有些情况可能会导致返回的信息不准确。然而,我对这个命令的体验非常好。 Laura Wingerd 所著的《Practical Perforce》一书中对该命令进行了简要描述。我的观点是,这个命令可能很快就会出现在一般帮助中。

希望这有帮助。

You want to use the 'interchanges' command. It's currently unsupported (as of release 10.2), but 'p4 help interchanges' will get you the command line usage for the tool (it is currently only available on the command line). I don't recall specifically what version this command was introduced.

p4 interchanges -b mybranch

Will report on unintegrated changes as defined by the branch spec. Use the '-r' as you would with 'p4 integ' to reverse the branch mapping. Filespecs can also be given on the command line if you don't have a branch spec:

p4 interchanges //depot/main/... //depot/RelA/...

Will report on unintegrated changes from main to RelA

As with any undocumented/unsupported feature, you need to be careful with the output. There may be some situations that cause inaccurate information to be returned. My experience with this command however, has been great. The command is briefly described in the book "Practical Perforce" by Laura Wingerd. My point being that this command is likely to see its way into general help very soon.

Hope this helps.

兔姬 2024-11-16 06:32:31

交换命令显示的结果如下所示:

Change #Changelist Number on #Date by #Person@#Workspace #Description。

如果您需要显示选择性列以进行进一步处理(生成报告)。你可以在 Linux / Unix 机器上尝试如下操作。

p4 interchanges //depot/branch1/... //depot/branch2/... | awk '{print $2"|"$4"|"$6"|"substr($0,index($0,$7)) }' 

The interchanges command display result like below

Change #Changelist Number on #Date by #Person@#Workspace #Description.

If you need to display selective columns for further processing (Generating Report). you can try something like below on Linux / Unix box.

p4 interchanges //depot/branch1/... //depot/branch2/... | awk '{print $2"|"$4"|"$6"|"substr($0,index($0,$7)) }' 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文