perforceperforce-integrate

In Perforce how can I avoid integrating files where "the files are identical"?


This occurs when you make changes to files on a branch, but then undo those changes before integrating to another branch.

Ideally I'd like to avoid polluting the main branch with changelists that don't actually have any changes in them.


Solution

  • You can force integrate the identical files from the main branch back to your dev branch, before integrating your changes back to main.

    p4 integ -f //depot/main/file.cpp //depot/dev/file.cpp
    

    You can also do it in P4V by setting the flag on the advanced tab of the integration window.

    This overwrites the integration history for those files on your dev branch, and they will no longer show up as "the files are identical" in changelists when you integrate back to main.

    It took me a while to find this, so I figured I'd make the knowledge more easily accessible by submitting it here.