2012-03-02 58 views
7

有时我们希望将更改从一个分支集成到另一个分支,但有效地忽略了源更改。通常我们用resolve -at这样做,意思是“忽略源变化”,并保持目标不变。然而,这个操作仍然影响到Perforce的元数据,因为它现在理解到所涉及的源修订版已经集成到了目标中,所以它们不会在未来的集成中出现。Perforce与已删除目标的集成

如果任何目标文件被删除,然而,决心将失败,并出现以下错误:

<dest> - can't branch from <source> without -d or -Dt flag

OK,所以使用-Dt标志和文件被重新添加。但是,它不符合解决的条件,所以我不能使用-at,任何提交都会重新创建该文件,这不是我想要的(即保持目标不变)。

有没有办法做我想要的?我不想为目标中的每个删除修改branchspec,实际上,这样的修改可能不适用于我不想要这种“不操作”行为的分支。

回答

13

较新版本的Perforce服务器(2011.1)为此提供了一个解决方案。从the release笔记:

When files have been edited in one branch and deleted in another, a special resolve will be scheduled to accept or ignore the branch or delete action. (This replaces the old "can't branch/delete without -d flag" warning.) The -Rb and -Rd flags to "p4 integrate" will force all branch and delete actions to be resolved, permitting them to be ignored even when they are not in conflict.

+0

完美,正是我需要的。似乎我们仍然坚持一些史前2010版本,但我会推动升级! – BeeOnRope 2012-03-03 23:28:04

+0

我们最终得到了这个版本,'-R *'标志按预期工作。 – BeeOnRope 2017-02-16 19:27:13