[p4] help with merging/integrating between branches

David Weintraub qazwart at gmail.com
Tue Mar 27 10:43:05 PST 2007


There's no reason you can't merge from B3 back to B1 or from any
branch to any other branch. All you need to do is specify the branches
when you do the integration.

Some people don't recommend that you merge from grandparent to
grandchild because of possible problems with resolving conflicts.
Others have had no problems.

Remember that the branchspec isn't needed. I only use a branchspec
when it the files between the two branches no longer agree with each
other. For example, you renamed a file on one branch, or you added or
deleted a file on one branch, but not the other.

Basically. Try:

   $ p4 integrate //depot/B3/... //depot/B1/...

And, see how it works out for you.


On 3/27/07, Andy Nguyen <andy.nguyen at gmail.com> wrote:
> Greetings,
>
> I have a few questions regards to merging/integrating between branches in
> Perforce.
>
> Let's say I have branch B1, and branched out for B2.  Then create B3 off B2.
>
> B1
> -----------------------------------------------------------------------------------------B1
>         \
>          ----------------------------------------------------------------B2
>                   \
>                    -----------------------------------B3
>                         \             \
>                           \            ---------------------------B3.1
>
> --------------------------------------------------B4
>
> I can easily merge all changes back to the parent branch (i.e.: from B2 to
> B1, and B4 to B3), and the cmd that used is "p4 integrate -r -b B1B2" or "p4
> integrate -r -b B3B4.   Please notes that B1B2 and B3B4 are my branch spec,
> which I created when the branch is generated.
>
> Is there a way to merge back to the "grand-parent" branch in Perforce?  I
> would like to merge all changes from B3 back to B1, and B4 back to B1.
> Since I don't have a branchspec, how can I proceed?  For example, I would
> like to merge all changes from B3 back to B1.
>
> Many thanks in advance, and I really appreciate for your help.
>
> Regards,
> -Andy
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


-- 
--
David Weintraub
qazwart at gmail.com


More information about the perforce-user mailing list