Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce integrations with deleted targets

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.

like image 242
BeeOnRope Avatar asked Mar 02 '12 00:03

BeeOnRope


1 Answers

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.

like image 163
user1054341 Avatar answered Sep 24 '22 17:09

user1054341