在 perforce 中集成移动的文件 [英] Integrating moved files in perforce

查看:45
本文介绍了在 perforce 中集成移动的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在我们的代码库中创建了一个分支.这是分支规范:

Say I created a branch in perforce of our codebase. Here is the branch spec:

//depot/code/main/... //depot/code/branch/...

然后,在分支中,假设我使用

Then, in the branch, say I move the branched file a.txt -> b.txt using

p4 integrate //depot/code/branch/a.txt //depot/code/branch/b.txt
p4 delete //depot/code/branch/a.txt

现在,假设对 main 中的 a.txt 进行了一些更改,我希望将其集成到分支中的 b.txt 中

Now, let's say some changes are made to a.txt in main which I would like to have integrated into b.txt in the branch

当我尝试使用原始分支规范进行集成时,它没有将 main 中对 a.txt 所做的更改反映到 b.txt 上 - 有没有办法让 main 中所做的更改显示在重命名的文件中?

When I try to integrate using the original branch spec, it doesn't reflect the changes made to a.txt in main onto b.txt - is there any way to have the changes made in main show up in the renamed file?

分支规范相当大(数百个更改)并且分支中的很多文件被重命名,所以我希望有一种自动化的方式来做到这一点.如果我能在这里澄清任何事情,请告诉我 - 有一块白板会有所帮助;)

The branch spec is rather large (hundreds of changes) and quite a few files were renamed in the branch, so I'd like to have an automated way to do this. Let me know if I can clarify anything here -- it would help to have a whiteboard ;)

谢谢!山姆

推荐答案

Perforce 2009.1 具有适当的重命名,这可能有助于解决此问题 - 可能,并且无论如何仅用于将来的重命名.请参阅 Perforce 2009.1 发行说明,特别是:

Perforce 2009.1 has proper renames, which might help with this - probably, and in any case only for future renames. See Perforce 2009.1 release notes, in particular:

#177023 * **
    The new 'p4 move' command allows for better support for
    renaming files.  A file must be already opened for 'edit'
    or 'add' in order to be moved.  Moved files can be synced,
    resolved and diffed against the repository just like files
    opened for 'edit'.  See 'p4 help move' for more info.

您可以将重命名添加到分支规范中.那么至少集成将是自动的——即使分支规范会更长更复杂.

You can add the rename into the branch spec. Then at least the integrations will be automatic - even if the branch spec will be even longer and more complicated.

这篇关于在 perforce 中集成移动的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆