Discussion about merging

John A Meinel john at arbash-meinel.com
Tue Jun 7 16:45:29 BST 2005


David Allouche wrote:
> On Sat, 2005-06-04 at 11:42 +1000, Martin Pool wrote:
> 
>>The main change I'd like to make from Arch there is to try to avoid
>>generating summary changesets when they have no semantics.  For
>>example, merely syncing my laptop with my desktop (where they use two
>>branches that move on the same path) should not generate a summary
>>changeset, but it does in Arch.
> 
> 
> Good news, you are already there. In Arch, this situation is yet another
> woe of the punning of namespace with ids.
> 
...
> So, to guard again the divergence problem (which is the exception in
> that use case) you have to use different branches, and then you have
> merges all over when that's not really what you mean.
> 
> With bzr, as long as there is no divergence, you need not do merges,
> just pulls. And if there is ever a divergence you only need one merge
> (summary changeset) to fix it and go back to the desired situation: two
> branches with the same ancestry.

I don't know if merge will properly merge ancestry for you. As I think
the interior revision-id will be different. However, because of the
unique identifiers, you can actually undo one of the commits, merge the
other commit, and then replay the original commit. Then just replay that
last commit on the other branch, and they are back to having identical
history.

We just need a real "undo", which can generate a "redo"-able changeset.
For now you can:
	edit .bzr/revision-history, remove the last entry
	bzr diff > ../my-changes.patch'
	patch -p0 --reverse < ../my-changes.patch
	bzr pull [other branch location]
	patch -p0 < ../my-changes.patch
	bzr commit -m [same commit message]

> 
> Okay, that looks like a card trick. Not my fault :)
> 

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050607/b04b3138/attachment.pgp 


More information about the bazaar mailing list