Bzr merge problem
Max Bowsher
maxb at f2s.com
Thu Dec 16 23:57:04 GMT 2010
On 16/12/10 22:24, Trent Johnson wrote:
> Hi
>
>
>
> I am trying to get a feature branch merged into our product’s
> development trunk.
>
>
>
> About a week ago a developer decided to merge his (incomplete) work into
> trunk, first he merged trunk with his branch (bug678) to get it
> up-to-date (trunk revision 273). Then the developer merged his feature
> branch with trunk (to create trunk revision 274).
>
>
>
> As the product manager, after a review of the work, I decided to revert
> the trunk back to the previous revision (revision 273) to get revision 275.
>
>
>
> I used:
>
> bzr revert -r273
You mean, that, followed by "bzr commit" ?
> The developer continued working on his feature branch, trunk received
> commits from other developers (now up to revision 279).
>
>
>
> The developer is now truly ready to merge and commit his feature branch
> with trunk.
>
> He performed a merge with trunk from within his feature branch:
>
> bzr merge ../trunk
>
>
>
> And received tuns of changes and conflicts. Many more than the simply
> changes that occurred between his previous merge of trunk and the HEAD
> of trunk.
Right, bzr tried to merge the reversion of all the early work on the
feature branch, into the feature branch, which had already diverged
further from that, point.
> How should he merge trunk back into his feature branch before merging
> his changes with trunk?
My instinct, though I've never been in this situation myself, says that
a suitable procedure would be:
Step 1: Acknowledge, in the feature branch, that the reversion happened,
but (naturally) don't actually revert the changes there.
cd /path/to/featurebranch
bzr merge -r 275 ../trunk
bzr revert . # Note the . here, it's important
bzr ci -m "Acknowledge backout of this branch from trunk."
Step 2: Actually merge in the rest of trunk
bzr merge ../trunk
# Resolve conflicts
bzr ci -m "Merge trunk."
Max.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20101216/804c3328/attachment-0001.pgp
More information about the bazaar
mailing list