How to merge two files in Perforce to keep the history of both files?

I have a perforce repository containing, among other things, the following:

depot
 |-- wug.h
 |-- wug1.cpp
 |-- wug2.cpp
 |-- wug3.cpp

wug.h contains the class declaration, and the definitions for this class are distributed through three other files. I would like to merge all the files into one file without losing my story. I looked through the documentation for most of the teams and don’t know how to do it. Can anyone suggest something?

+4
source share
1 answer

If you want to create a new file called "wug.cpp" that contains all the others, leave a record of this in the metadata and do it all in one change list, you can do:

p4 merge wug1.cpp wug.cpp
p4 resolve (choose 'at', to branch the file)
p4 merge wug2.cpp wug.cpp
p4 resolve (choose 'm' to invoke perforce merge tool, then 'ae' to accept)
p4 merge wug3.cpp wug.cpp
p4 resolve (choose 'm' to invoke perforce merge tool, then 'ae' to accept)
p4 delete wug1.cpp wug2.cpp wug3.cpp
p4 submit

" p4" , , , . Perforce ( ) , , , .

( p4 edit wug.cpp, ), , , , .

, p4 annotate -I wug.cpp , .

+4

All Articles