Perforce, how to merge a file changes between latest revision and the base version from one stream to another?

577 Views Asked by At

I have two streams namely S1(let it be a source stream) and S2(target stream). Assuming there is a file "abc.txt" which is currently at version #5. I need to merge the changes that were done in "abc.txt" between #1 and #5 to my target stream S2. Can someone please suggest if this would be possible in perforce?

1

There are 1 best solutions below

0
Samwise On

Yes, this is possible.

p4 switch S2
p4 merge --from S1 abc.txt

If you want to just merge all outstanding changes from all files, leave off the abc.txt. If you want to just merge a particular range of changes, add the range to the file path (e.g. abc.txt#4,#5 or abc.txt@123,456).