[PATCH] Merge needs no BASE_SPEC, better docs

John Arbash Meinel john at arbash-meinel.com
Thu May 26 15:57:48 BST 2005


Aaron Bentley wrote:

> Hi,
>
> This patch makes the BASE_SPEC parameter of the 'merge' command
> optional.  If the BASE_SPEC is not supplied, the latest common ancestor
> of './@' and OTHER_SPEC is used.  It also adds some decent inline
> documentation of merge.
>
> This patch does about 4 different things, so I can generate several
> different patches if that's preferred.
>
> On the other hand... Hey, test cases!
>
> Aaron

I'm a little bit curious about this patch. Specifically the
common_ancestor function.

As I understand common_ancestor, it basically just goes backwards to
find the subset of completely common ancestry. So it finds the point
when I branched from the previous tree. And if I merge *everything* from
the previous tree, then the trees are identical again, and it will find
the new branch point.

What concerns me is if you have 2 trees each with on-going development,
and you want to merge some of the changes from the other one.

For example:

base at 1:10 -> branch1
11              11
12              12
 |              13
 |              14
 \              15
  ------------> 16 (merge of base at 11:12)
13		17
14		18
 \		19
  ---???------>	20


So you have a base tree, which you commit up to rev 10. You then branch
this, and work continues on both trees. You then merge the 2 changes to
the base tree into your branch. I'm pretty sure common ancestor will
find those correctly, since the revision numbers line up perfectly.
But now branch1 technically is branched off of base at 12, will it realize
this when you go to merge again at branch at 20? Or will it only see that
the common ancestor is base at 10?

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050526/40fd7ea1/attachment.pgp 


More information about the bazaar mailing list