Discussion about merging
David Allouche
david at allouche.net
Sun Jun 12 23:26:18 BST 2005
On Tue, 2005-06-07 at 10:45 -0500, John A Meinel wrote:
> David Allouche wrote:
> > 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.
My lack of practical experience with bzr is starting to show :) I'll try
to clarify what I meant:
The use case is: one person works on the same branch from two different
but connected systems, Laptop and and Desktop.
There are essentially two scenario. The common-case scenario is the
absence of divergence:
1. Initially, the trees are identical on Desktop and Laptop.
2. User makes commits on on laptop.
3. User transmits new commits to Desktop, and update the Desktop
tree.
4. Both branches now have the same ancestry.
In that scenario, no merge is involved, so the granularity of all
commits, regardless the originating system, is preserved in the ancestry
at no effort.
The exceptional scenario, the one that make it necessary to use
different branches in the Arch model is the occurrence of divergence.
1. Initially, the trees are identical on Desktop and Laptop.
2. User makes commits on Laptop.
3. User is sloppy, or has to make an emergency fix, and commits on
Desktop.
4. At this point, Desktop and Laptop have different ideas of what
is the latest commit on the branch. In Arch, that's very, very
bad. But in Bazaar-NG, that's not a problem.
5. User transmits Laptop's commits to Desktop, and performs a
merge.
6. User syncs (e.g. with rsync) Laptop from Desktop, effectively
changing the history of the branch stored on the Laptop. Then
the latest revision on both systems in the merge done at 5.
My point is that Arch requires you to use different (namespace) branches
and merge every time, because it cannot cope with the exceptional
divergence. Bazaar-NG has no such issue, so the common case scenario
stays simple, and merges are only required when a divergence occurred.
--
-- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050613/92750ca4/attachment.pgp
More information about the bazaar
mailing list