[PLUGIN] Alternative merge pulls history, and finds best base.
John Arbash Meinel
john at arbash-meinel.com
Tue Jul 5 02:04:52 BST 2005
I created a new plugin, available at:
http://bzr.arbash-meinel.com/plugins/merge/
To start with, I created a RevisionPuller() class. It should handle
branching history (since each revision can now have multiple parents).
This might just be future alternate to the current
branch.update_revisions (though that adds the revisions to the history).
The unfortunate side effect of multiple parents is that now you can't
just trust branch.revision_history().
Anyway, I think I've implemented a method which uses a breadth-first
search through the ancestry, looking for the first common ancestor. It
is probably fairly expensive, especially if you have a very large tree,
but I think it will give you the best answer, and for now, I'm working
on correctness.
I'm trying to write the tests for it now so please forgive me if it is a
little bit buggy.
Basically, it changes the merge code so that it pulls in all of the
history from other, which doesn't exist in local, and then uses
breadth-first-search to go through the ancestry, looking for a common
revision. This revision is then used as base, and a normal merge is done.
John
=:->
More information about the bazaar
mailing list