A Special Integration Case Learning

This is the case: let's say there are two branches: BranchA and Main. On BranchA, there happens two kinds of code changes: one is needed for Main in this time integration and the other is not needed. Well, a fact here is that it's wrong to do two things in one branch I think..

Now in integration, we want integrate FileA.cpp latest version but without some code changes. So I integrate it by P4, check it out and edit it with deleting some code changes, and finally integrate it to Main.

Here is the question: how can we integrate the deleted code changes for FileA.cpp into Main later on?

The answer is tough: no automatic way like integration. Because that file has been recognized by P4 as a already integrated file. Maybe there is solution by P4 but I don't know??

My solution is: check out those files on BranchA and use P4 Changelist Grabber to get those files following their folder structure; and then copy them into your local Main folder. Now switch to Main folder for P4 and check out those files. Now you can get those missed code changes back for Main..

原文地址:https://www.cnblogs.com/taoxu0903/p/1788564.html