[MERGE] Branch.iter_merge_sorted_revisions
Martin Albisetti
argentina at gmail.com
Fri Jan 23 23:45:11 GMT 2009
In case it seems better, this is what we're using in loggerhead now
instead of _old_get_graph. Still have to pass it through
_strip_NULL_ghosts, but I don't know another way around this.
Not sure if it's an improvement or not, but it does still pass all the tests :)
=== modified file 'bzrlib/branch.py'
--- bzrlib/branch.py 2009-01-23 23:32:16 +0000
+++ bzrlib/branch.py 2009-01-23 23:33:20 +0000
@@ -249,8 +249,10 @@
# start_revision_id.
if self._merge_sorted_revisions_cache is None:
last_revision = self.last_revision()
- revision_graph = repository._old_get_graph(self.repository,
- last_revision)
+ graph = self.repository.get_graph()
+ parent_map = dict(((key, value) for key, value in
+ graph.iter_ancestry([last_revision]) if value is
not None))
+ revision_graph = repository._strip_NULL_ghosts(parent_map)
self._merge_sorted_revisions_cache = tsort.merge_sort(
revision_graph,
last_revision,
--
Martin
More information about the bazaar
mailing list