[p4] Integration messiness
John Hopkins
johnh at ca.sophos.com
Mon Sep 11 10:03:08 PDT 2006
> Hello All,
>
> I've got a team that is running into trouble with integrations from
> their branch. We've been using branches for years, and at any one time,
> we may have 20 or 30 branches out in development, so we've gotten pretty
> used to them. It's all gone rather well in most cases.
>
> This particular branch though is having more than its share of merge
> problems when coming back to main. My hunch is that it has to do with
> the nature of the integrations in this branch. Like all other branches,
> it regularly gets integrations up from it source branch (main).
> However, unlike all our other branches, it also integrates back to main
> quite frequently, so there is regular traffic to and from this branch.
> I had seen this a while back with another branch where they had similar
> problems, and mass integrated both directions frequently. The problems
> are typically things like changes getting lost, deleted portions getting
> reintroduced, and things like curly braces getting badly interleaved.
> When trying to trace back how this badness may have been caused, it all
> gets remarkably complicated and remains so very subtle. I have found
> that I am seeing more "Merge with Edit" resolves than are typical of
> most branches.
>
> So I am hoping that one of you may have zeroed in on some more general
> typical workflow problems that can cause these. We're all windows,
> p4Win and P4V, with the P4Win users mostly using Araxis for the
> diff/merge.
What commands are you using to sync to and from the various branches?
Have you run 'p4 verify' on your depot to ensure there are no bad
checksums, etc...?
We essentially use the following workflow when doing a copy-up to our
release branch (all from the command-line):
# make sure no changes need to come down from release
p4 integrate -Idtn release/... source/...
# Integrate changes
p4 integrate -Idt1 source/... release/...
p4 resolve -at release/...
p4 submit release/...
# Ensure the branches match exactly
p4 diff2 -q source/... release/...
Note above that we resorted to using the undocumented '1' (one) switch
to integrate because there were times when just using the indirect
integration history missed 1-3 files. The reason is unclear.
When syncing down from the release branch into a project branch, these
are the steps I like to use:
# Ensure no work open at the moment
p4 opened project/...
# Generate list of changes to come over to add
# to the change description (pull into editor at submit time)
p4 interchanges release/... project/... > /tmp/changes
# Integrate latest changes
p4 integrate -Idt1 release/... project/...
# Do a 'safe' resolve
p4 resolve -as project/...
# Manually inspect remaining changes (usually accept Perforce's
# suggestion)
p4 resolve project/...
p4 submit project/...
hth,
John
More information about the perforce-user
mailing list