Say I created a branch in perforce of our codebase. Here is the branch spec:
//depot/code/main/... //depot/code/branch/...
Then, in the branch, say I move the branched file a.txt -> b.txt using
p4 integrate //depot/code/branch/a.txt //depot/code/branch/b.txt
p4 delete //depot/code/branch/a.txt
Now, let's say some changes are made to a.txt in main which I would like to have integrated into b.txt in the branch
When I try to integrate using the original branch spec, it doesn't reflect the changes made to a.txt in main onto b.txt - is there any way to have the changes made in main show up in the renamed file?
The branch spec is rather large (hundreds of changes) and quite a few files were renamed in the branch, so I'd like to have an automated way to do this. Let me know if I can clarify anything here -- it would help to have a whiteboard ;)
Thanks! Sam
You can add '-3' switch to use a new engine for integration, which will detect target files that have been previously moved with 'p4 move', and automatically 'retarget' itself to follow those move operations.
p4 integrate -3 //depot/code/main/... //depot/code/branch/...
will integrate your changes in //depot/code/main/a.txt to //depot/code/branch/b.txt.
This is the 'undoc' feature in current 2010.2 release, but will be the default behavior in the upcoming 2011.1.