Search code examples
editperforcemove

How can I prevent perforce from opening / moving deleted files?


Hello helpful persons,

I'm working with trying to set up some new branch structures in our companies codebase for organization and sanity purposes. True to form decision makers have changed their minds and want the structure to be changed a bit from what I already have in place. Not an over-the-top request though, because no one is yet using the new structure so I have "free reign".

I need to simply move these thousands of files in the containing branch directories (//depot/main/... and //depot/dev/... respectively) into a //depot/main/[product_name]/... structure etc. which I'm on board with and understand the advantages.

While opening the files from //depot/main/... for edit and move I see in my output that there are several warning messages:

warning: edit of deleted file

and

warning: move of deleted file

How can I tell perforce that I do not want to open deleted files for edit, and in turn that I do not want to move deleted files to the new location(s)?

I have a feeling that there is some documentation that I am either not understanding or not finding properly.


Solution

  • Generally you only get that particular warning if you aren't synced to head and are trying to move a file. Make sure you are synced to the head revisions.

    As suggested by raven you should probably be using integrate for this. Generally my recommendation is to use 'p4edit/p4 move' intra-branch and 'p4 populate/integ/copy/merge' for interbranch branch integrations.