[p4] view code from multiple branches

Kamlesh Mutha mkamlesh at gmail.com
Mon Aug 3 21:58:24 PDT 2009


Thank you all for your comments. I guess, integrating periodically seems to
be the best possible way to handle this issue. I will follow that.

Thanks and Regards,
Kamlesh.



On Tue, Aug 4, 2009 at 8:34 AM, <rickmacd at shaw.ca> wrote:

> I think this idea breaks down quite easily. For example, consider if you
> modify file "A" in your private branch and somebody updates file "A" and
> file "B" in main with dependent changes such that the changes to file A
> and B in main are needed together. You're saying you want only the file  B
> change from main in your workspace because  you've changed file A in  your
> branch. Your file A with his file B is not going to be correct.  Then
> what? Assuming the policy of the main branch is that everything is  tested
> and correct, the programmer might waste time thinking he made a  mistake
> in his branch.
>
> I do one of two things depending on the nature of the code and the
> changes in the private branch and how long the private branch task takes
> to complete. Either I completely finish the private task branch before
> integrating "down" from main, or I constantly merge in changes from main
> as I go along. Or, something between these two extremes such as "points
> of completion" in the private branch (where I'm not done the whole task,
> but things are in a good state and everything done so far is working
> well).
>
> It seems to me that what you are wanting to do is much harder than
> integrating from main, and your only motivation seems to be to protect
> people from integrating.
>
> Rick
>
> Kamlesh Mutha wrote:
> > Just to clarify, let me correct the typo first:
> >
> > My requirement is:
> >
> > 1. I have a branch //depot/main/...
> > 2. I fork off a new branch //depot/itr/... from //depot/main
> > 3. I want to have a workspace in which I should be able to see following
> files
> >     a. All files modified on //depot/itr branch
> >     b. For a file which is not modified on //depot/itr/..., the latest
> > revision from //depot/main/... branch.
> >
> > Why is it needed ?
> >
> > /itr branch is a private branch and developer is working on some
> development. While he is working on private branch and main branch is
> changing (for the planned development). The developer should be able to
> see those changes in a workspace along with his own changes to ensure
> that both changes together still build/function fine. Intention is to
> avoid major surprise just after integrating private branch in main.
> >
> > I know, perforce recommends that you keep on rebasing your private
> branch by integrating changes from main to private but that involves
> "integration" and people sometimes find it pretty difficult. Hence I
> wanted to check if this can be handled through some special purpose
> workspace.
> >
> > Thanks and Regards,
> > Kamlesh
> >
>
>
>
>
>
>


-- 
Faith waiting in the heart of a seed promises a miracle of life which it can
not prove!
-Ravindranath Tagore



More information about the perforce-user mailing list