[MERGE] Implement Tree.plan_merge, deprecate RevisionTree.get_weave
Robert Collins
robertc at robertcollins.net
Thu Jul 19 08:12:14 BST 2007
Robert Collins has voted +1 (conditional).
Status is now: Conditionally approved
Comment:
+ # Disable pending merges, to avoid affecting merge behavior
+ tree.set_parent_ids(parents[:1])
Could you explain more why this is needed? It seems prone to losing a
users data e.g. during a power-off or kill -9 situation as well as
requiring more work at the tree layer to discard and recreate the cached
parent data.
with our current API
+ def _get_ancestors(self, default_revision):
+ ancestors = set([default_revision])
+ for parent_id in self.get_parent_ids():
+ ancestors.update(self.branch.repository.get_ancestry(
+ parent_id, topo_sorted=False))
+ return ancestors
will be faster as
+ ancestors = set([default_revision])
+
ancestors.update(self.branch.repository.get_revision_graph(self.get_parent_ids()))
+ return ancestors
because that will do just one index traversal.
Its interesting that we grab full ancestry here. This doesn't affect the
merge, but I wonder about giving a callback here, or even using the file
merge graph which will be much smaller to reduce the amount of index
looked at.
With the previously discussed plan_merge -> plan_file_merge I'm happy to
see this come in.
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C469D2641.7020504%40utoronto.ca%3E
More information about the bazaar
mailing list