Rev 4384: Since we are skipping, we should set node.linear_dominator to full-width as well. in http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads

John Arbash Meinel john at arbash-meinel.com
Mon Jun 8 23:04:03 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads

------------------------------------------------------------
revno: 4384
revision-id: john at arbash-meinel.com-20090608220358-7ljjh8zvdch9cxbd
parent: john at arbash-meinel.com-20090608220045-4ldppuufcutyt701
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-better_heads
timestamp: Mon 2009-06-08 17:03:58 -0500
message:
  Since we are skipping, we should set node.linear_dominator to full-width as well.
-------------- next part --------------
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py	2009-06-08 22:00:45 +0000
+++ b/bzrlib/graph.py	2009-06-08 22:03:58 +0000
@@ -1391,10 +1391,6 @@
         nodes = self._nodes
         heappop = heapq.heappop
         heappush = heapq.heappush
-        def combine_parents(one, two):
-            all_ancestors = set(one)
-            all_ancestors.update(two)
-            return tuple(sorted(all_ancestors))
         while queue and len(candidate_nodes) > 1:
             counters[0] += 1
             _, next = heappop(queue)
@@ -1407,6 +1403,10 @@
                     parent_node = nodes[parent_key]
                     if parent_node.ancestor_of is not None:
                         parent_node.ancestor_of = next_ancestor_of
+                if node.linear_dominator != node.key:
+                    parent_node = nodes[node.linear_dominator]
+                    if parent_node.ancestor_of is not None:
+                        parent_node.ancestor_of = next_ancestor_of
                 continue
             if next.parent_keys is None:
                 # This is a ghost



More information about the bazaar-commits mailing list