【问题标题】:Perforce to ignore revision during integrations强制在集成期间忽略修订
【发布时间】:2015-06-03 08:18:41
【问题描述】:

我为我们的一个项目创建了功能分支,并在一个变更列表中删除了所有文档文件。 (我知道,这是个坏主意)。

我想整合除给定变更列表之外的所有内容,我尝试以下忽略它:

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

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

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

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

【问题讨论】:

    标签: perforce


    【解决方案1】:

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

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

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

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

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

    相关 p4 博客条目:

    【讨论】:

    • 我不知道为什么我错过了-Rd 标志。非常感谢!
    【解决方案2】:

    您似乎在这里想要“resolve -ay”,而不是“resolve -at”。整合回main时,我认为“theirs”是分支,而“yours”是main。

    来自“p4 帮助解决”:

       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'.
    

    【讨论】:

    • 布莱恩,感谢您的回答。我已经更新了我原来的问题 - 解决没有做任何事情(-ay/-at - 没有变化)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-16
    • 1970-01-01
    • 2017-10-04
    • 2014-07-26
    • 2010-10-17
    • 2017-05-01
    • 1970-01-01
    相关资源
    最近更新 更多