Perforce在集成期间忽略修订

时间:2015-06-03 08:18:42

标签: perforce

我为其中一个项目创建了功能分支,并在一个更改列表中删除了所有文档文件。 (我知道,不好主意)。

我想整合除了给定的更改列表之外的所有内容,我试着忽略它:

p4 integrate //branch/...@CL,CL //main/...
p4 resolve -at //main/...

但是,文件仍然标记为删除 - 解决方案以

结束
//main/... - no file(s) to resolver.

有没有办法告诉perforce已经集成CL并在后续集成中忽略它?

2 个答案:

答案 0 :(得分:2)

请注意,您至少需要一台2011.1服务器来执行此操作(如果您的服务器较旧,则会在集成时收到错误消息):

p4 integrate -Rd //branch/...@CL,CL //main/...
p4 resolve -ay

“-R d ”标志表示通常会自动打开 d elete的文件应该打开以进行集成并安排解决。反过来,“p4 resolve -a y ”会表示您希望保留 y 我们工作区中的内容(“整合”而不更改内容)并提交作为最终结果。

提交的“集成”修订版将记录您已完成此集成(历史记录将显示“忽略”您分支中已删除的修订版本),但不会实际更改提交文件的内容。

如果您使用“p4 merge”命令而不是“p4 integrate”命令(使用更新的服务器版本,我认为2013.1或其左右),所有文件都会被安排自动解决(即包括之前有的文件)已自动打开分支或删除),因此使用“p4 merge”时,您始终必须解决(并且可以选择忽略)任何源更改。

相关的p4博客条目:

答案 1 :(得分:0)

好像你想要'解决'-ay',而不是'resolve -at'。当整合回主要时,我认为“他们的”是分支,而“你的”是主要的。

来自'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'.
相关问题