[p4] Cherry-pick VS bulk integrate

Nicholas Guarracino nguarracino at dataviz.com
Fri Dec 8 07:43:46 PST 2006


David Ferguson wrote:
> I don't mean that.  Editing a file and putting the same change in manually is
> not what we're doing.   We're using full p4 integrate commands, we're just
> isolating the integrate at different times to a specific changeset, rather
> than a range of changesets.
> 
> Assume changes 1-8 have been made to a file (or set of files) on branch A
> Somewhere there is a branch B (not necessarily a direct relation to A).
> Change 4 (in it's entirety) is integrated directly into branch B.
> At some latter time, someone tries to do a bulk merge of A into B (possibly
> through intermediary branches)...
> As far as perforce is concerned, ALL the changes 1 through 8 (from A) will be
> applied to branch  B, resulting in change 4 being applied twice.  In the vast
> majority of the cases, this isn't a problem -- The redundant code either
> shows up as identical code, or in some weird situations, a strict conflict.
> In either case, the merger can easily see that it happened and figure out
> what to do.
> 
> But ... In some sufficiently complicated branching situations, we are seeing
> code duplicated without visible notification, resulting in files being
> 'safe'ly resolved without the developer realizing the issue.  I understand
> the issue (it is quite difficult to handle the multiple integrate/resolve
> cycles that would otherwise be necessary in a bulk merge), but we're trying
> to figure out a solution.
> 
> In any event, the question is does anyone else mix and match this kind of
> cherry-picking and bulk merges?  Or are we alone in this usage model?

We have run into some similar issues. We try to stick to the main line
model of only integrating between branches and their direct parents /
children. What sometimes ends up happening is that a small bug fix might
occur on a development branch, but that changelist is integrated into
our main line as part of a bulk integration. Then if we want to get
*only* that one changelist into a separate branch (say a branch working
towards a release, where we would not want the rest of the changes that
were integrated into the main line,) we are stuck.

In those cases, I don't know if it's better to a) manually copy & paste
just the bug fix into the release branch; b) integrate from the main
line to the release branch, disregarding all changes but the one we
want; or c) skip over the main line entirely and integrate just the one
change from the development branch into the release branch. I think
we've tried each of them at various points, and none of them seemed
ideal. So far I don't know of subsequent integration problems from any
of these methods.

--Nick


More information about the perforce-user mailing list