2012-03-02 56 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