[PATCH] common ancestor selection

Aaron Bentley aaron.bentley at utoronto.ca
Sun Jul 10 23:30:53 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch builds on my previous is_ancestor patch.  It implements a
common ancestor selection algorithm that
1. works with multiple parents
2. tolerates missing ancestors
3. can select a base that is not in the revision-history of either branch
4. has defined behavior for crossed merges.

A crossed merge scenario is one where branch A merges branch B, while at
the same time branch B merges branch A.  After committing, both branches
have the same two ancestors, so there is no one best base.

In this situation, my merge algorithm will pick the base that is
leftmost in the parents list of the (ancestor of the) first revision
specified.

common_ancestor.patch
Implements the common ancestor selection

pending-merge.patch
Merge finds common ancestor using new implementation, invokes
Branch.add_pending_merge as appropriate

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC0aGd0F+nu1YWqI0RAipgAJ95egw7zXfZN7zfx/ZTRHi822nIewCcDBRf
Gt3kfICvJPJamRgyiWRnR84=
=O5ru
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common_ancestor.patch
Type: text/x-patch
Size: 7815 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050710/88b795f2/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending-merge.patch
Type: text/x-patch
Size: 4394 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050710/88b795f2/attachment-0001.bin 


More information about the bazaar mailing list