Perforce 在集成期间忽略修订
Perforce to ignore revision during integrations
我已经为我们的一个项目创建了功能分支,并删除了其中一个更改列表中的所有文档文件。 (我知道,坏主意)。
除了给定的更改列表,我想整合回所有内容,我尝试按照以下方式忽略它:
p4 integrate //branch/...@CL,CL //main/...
p4 resolve -at //main/...
但是,文件仍标记为删除 - 解决以
结束
//main/... - no file(s) to resolver.
有什么方法可以告诉 perforce 给定的 CL 已经集成并在后续集成中忽略它?
您似乎想要 'resolve -ay',而不是 'resolve -at'。整合回main时,我认为"theirs"是branch,而"yours"是main。
来自'p4 help resolve':
The resolve process is a classic three-way merge. The participating
files are referred to as follows:
'yours' The target file open in the client workspace
'theirs' The source file in the depot
'base' The common ancestor; the highest revision of the
source file already accounted for in the target.
'merged' The merged result.
Filenames, filetypes, and text file content can be resolved by
accepting 'yours', 'theirs', or 'merged'. Branching, deletion, and
binary file content can be resolved by accepting either 'yours' or
'theirs'.
请注意,您至少需要一台 2011.1 服务器才能执行此操作(如果您的服务器较旧,您将在集成时收到一条错误消息):
p4 integrate -Rd //branch/...@CL,CL //main/...
p4 resolve -ay
“-Rd”标志表示通常为 delete 自动打开的文件应该为集成和打开改为安排解决。反过来,"p4 resolve -ay" 会说您想保留 y 工作区中的内容("integrate" 没有内容更改)并将其作为最终结果提交.
提交的 "integrate" 修订将记录您已完成此集成(历史记录将显示 "ignore" 在您的分支中删除的修订),但不会实际更改提交的内容文件。
如果您使用 "p4 merge" 命令而不是 "p4 integrate" 命令(使用更新的服务器版本,我认为是 2013.1 左右),所有文件都会自动安排解析(即包括那些以前会自动打开以进行分支或删除),因此使用 "p4 merge" 您始终必须解决(并且可以选择忽略)任何源更改。
相关 p4 博客条目:
我已经为我们的一个项目创建了功能分支,并删除了其中一个更改列表中的所有文档文件。 (我知道,坏主意)。
除了给定的更改列表,我想整合回所有内容,我尝试按照以下方式忽略它:
p4 integrate //branch/...@CL,CL //main/...
p4 resolve -at //main/...
但是,文件仍标记为删除 - 解决以
结束//main/... - no file(s) to resolver.
有什么方法可以告诉 perforce 给定的 CL 已经集成并在后续集成中忽略它?
您似乎想要 'resolve -ay',而不是 'resolve -at'。整合回main时,我认为"theirs"是branch,而"yours"是main。
来自'p4 help resolve':
The resolve process is a classic three-way merge. The participating
files are referred to as follows:
'yours' The target file open in the client workspace
'theirs' The source file in the depot
'base' The common ancestor; the highest revision of the
source file already accounted for in the target.
'merged' The merged result.
Filenames, filetypes, and text file content can be resolved by
accepting 'yours', 'theirs', or 'merged'. Branching, deletion, and
binary file content can be resolved by accepting either 'yours' or
'theirs'.
请注意,您至少需要一台 2011.1 服务器才能执行此操作(如果您的服务器较旧,您将在集成时收到一条错误消息):
p4 integrate -Rd //branch/...@CL,CL //main/...
p4 resolve -ay
“-Rd”标志表示通常为 delete 自动打开的文件应该为集成和打开改为安排解决。反过来,"p4 resolve -ay" 会说您想保留 y 工作区中的内容("integrate" 没有内容更改)并将其作为最终结果提交.
提交的 "integrate" 修订将记录您已完成此集成(历史记录将显示 "ignore" 在您的分支中删除的修订),但不会实际更改提交的内容文件。
如果您使用 "p4 merge" 命令而不是 "p4 integrate" 命令(使用更新的服务器版本,我认为是 2013.1 左右),所有文件都会自动安排解析(即包括那些以前会自动打开以进行分支或删除),因此使用 "p4 merge" 您始终必须解决(并且可以选择忽略)任何源更改。
相关 p4 博客条目: