Sometimes we'd like to integrate a change from one branch to another, but have the source changes effectively be ignored. Typically we do this with resolve -at
, meaning "just ignore the source changes", and leave the target unchanged. This operation still affects the Perforce metadata, however, since it now understands that the source revisions in question have been integrated to the target, so they won't come up in future integrations.
If any target file is deleted, however, the resolve will fail with the following error:
<dest> - can't branch from <source> without -d or -Dt flag
OK, so use the -Dt
flag, and the file gets re-added. It's not eligible for resolve, however, so I can't use -at
, and any submit will recreate the file, which is not what I want (which is to leave the destination unchanged).
Is there any way to do what I want? I don't want to have modify the branchspec for every deletion in the destination either, and in fact such modifications might not be appropriate for branches for which I won't want this "no op" behavior.
The newer version of the Perforce server (2011.1) has a solution for this. From the release notes:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With