Question/idea about multiple developers committing to one branch

David Allouche david at
Mon Dec 4 12:47:25 GMT 2006

Aaron Bentley wrote:
> Nicholas Allen wrote:
>>> So when
>>> pushing to a location bzr just needs to determine if there have been
>>> merges from that location and reorder the parents of the merged
>>> revisions so that the push location's revisions are the first parent
>>> instead of the second parent of the merged revision.
> You can't change the order of the parents of a revision.  The order of
> the parents is part of the logical structure of a revision.

What he _could_ do however:

mainline  A ---- B ----- E
           \       \    /
checkout    `- C -- D -'

Where D is produced by:

checkout % bzr merge
checkout % bzr commit -m 'merge mainline'

And E is transparently produced (please read ahead before reacting) by:

checkout % bzr push

Pushing would only automatically create E if it has the exact same tree
state as D. That can be simplified into "only create an automatic
revision if checkout is up to date with mainline".

Frankly, I do not like this approach much. I think it would be better to
just change the default behavior of push so it would only append
revisions whose leftmost parent is the head of the target.

So "bzr push" would never change the history of the target. The current
behavior of push would be provided by "bzr push --reorder".

The existing "bzr push --overwrite" would imply --reorder.

So to produce this branch structure, the interaction would be (some
handwaving here, I do not think bzr currently provides this level of

checkout % bzr merge
checkout % bzr commit -m 'merge mainline'
checkout % bzr push
ERROR: the head of the push target is a merged revision of this branch:
The head of the push target is 566.1.1 in this branch.
You can use "bzr push --reorder" to overwrite the history of the push
You can use "bzr bind" then "bzr update" and "bzr commit" to merge this
branch into the push target without reordering the history of the target.
checkout % bzr bind
Turning this branch into a checkout of the push target:
checkout % bzr status
Checkout has diverged. Use "bzr update" then "bzr commit" to merge your
checkout % bzr update
Updated to revision 565.
checkout % bzr commit -m 'a shiny feature'

I hope I am not too confused about the behavior you expect.
                                                            -- ddaa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : 

More information about the bazaar mailing list