views:

349

answers:

1

Is there a simple way to convert a (large) list of p4 moves to p4 integrates? There are a lot of pending modifications to the moved files, so just reverting and instead integrating isn't an option.

Perforce won't let you just revert the deleted file (which would leave the desired integration behind).

A: 

Even if Perforce allowed it, reverting the deleted files wouldn't leave an integration behind, it would leave an add behind. A move operation consists of adding (not integrating) the file(s) to the new location and then deleting them from the old. If you think about it, integrating files to a new location and then deleting them from their original location makes no sense. The purpose of an integration is to maintain a relationship between two sets of files.

As far as I know, Perforce provides no "one click" mechanism to do what you want, but it's not too difficult:

  • Copy the files you've modified to a temporary directory
  • Revert your file moves
  • Integrate the files and then open them for edit in their new location
  • Copy the changed files from the temporary directory into the new location and submit them
raven
That's pretty much what my back-up plan is. = PI used the term 'integrate' in place of 'add' because integrate retains the revision-history for the newly created file. From what I understand (I could very well be wrong), before Perforce supported the explicit 'move' operation, the only equivalent method was to integrate to a new location and delete the previous instance.Thanks for the thoughts, though. = )
pmarden