[p4] "why should I restrict a changelist to a branch?"
Nick.Barnes at pobox.com
Mon Mar 7 14:08:22 PST 2005
At 2005-03-07 17:35:50+0000, "Jay Glanville" writes:
> Hello all.
> I need some help (in so many ways, but for now, lets focus on P4 help).
> I need a good argument for a situation.
> Just the other day, I noticed that co-worker submitted a changelist that
> modified the same file in two different branches. I recommended to him
> that it probably would be better if he limited a changelist to a single
> branch. To which, he replied, "Why? Both versions of the file were
> modified for the same reason (a bug)."
> My counter argument was, "to keep the two branches in sync. By making
> the change in one branch, and then integrating it into the other branch
> allows us to see that delta A has been propagated to the other branch."
> His counter to my counter was, "So what? Once they branched, they now
> have separate lives. If I want to apply a single change to both
> versions, I'll do it in a single changelist. Besides, what does an
> integrate actually mean? Does it mean that the branches are
> synchronized? What does it mean when I've only propagated some changes
> and not all? Performing 'p4 integrate' doesn't actually give me
> And that's where I failed: I couldn't think of a good argument as to
> why he should limit a changelist to a single branch.
I'm sure there are other good reasons, but here's three to get the
1. For the same reason that cut-and-paste is bad. He might think he's
making the same change to both branches. How can he be sure? The
edit/integrate/resolve pattern gives you the identical fix if there's
no clash, and makes you think about how his fix interacts with
differences between the branches when there is a clash.
2. It's a Bad Habit, which will eventually cause the job system to
Tell You Lies. Make a change to both branches, fixing a job in branch
A but not in B (maybe by oversight). Now ask p4 fixes B/...
3. I have no idea how it interacts with people working in an
integrating-changes mode. What happens when you integrate such a
changelist across the branch? Ick.
More information about the perforce-user