Rev 3426: Small documentation and code wrapping cleanup in http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/find_unique_ancestors

John Arbash Meinel john at arbash-meinel.com
Wed May 21 00:22:51 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/find_unique_ancestors

------------------------------------------------------------
revno: 3426
revision-id: john at arbash-meinel.com-20080520232241-hodoh6db5wslse1o
parent: john at arbash-meinel.com-20080520231020-wh8g3pq0whu2p78i
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: find_unique_ancestors
timestamp: Tue 2008-05-20 18:22:41 -0500
message:
  Small documentation and code wrapping cleanup
modified:
  bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
-------------- next part --------------
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py	2008-05-20 23:10:20 +0000
+++ b/bzrlib/graph.py	2008-05-20 23:22:41 +0000
@@ -306,7 +306,6 @@
 
         return unique_searcher, common_searcher
 
-
     def _make_unique_searchers(self, unique_nodes, unique_searcher,
                                common_searcher):
         """Create a searcher for all the unique search tips (step 4).
@@ -370,6 +369,7 @@
     def _step_unique_and_common_searchers(self, common_searcher,
                                           unique_tip_searchers,
                                           unique_searcher):
+        """Step all the searchers"""
         newly_seen_common = set(common_searcher.step())
         newly_seen_unique = set()
         for searcher in unique_tip_searchers:
@@ -494,9 +494,15 @@
                     all_unique_searcher.seen.intersection(newly_seen_common))
             if unique_are_common_nodes:
                 unique_are_common_nodes.update(
-                    common_searcher.find_seen_ancestors(unique_are_common_nodes))
+                    common_searcher.find_seen_ancestors(
+                        unique_are_common_nodes))
                 # The all_unique searcher can start searching the common nodes
                 # but everyone else can stop.
+                # This is the sort of thing where we would like to not have it
+                # start_searching all of the nodes, but only mark all of them
+                # as seen, and have it search only the actual tips. Otherwise
+                # it is another get_parent_map() traversal for it to figure out
+                # what we already should know.
                 all_unique_searcher.start_searching(unique_are_common_nodes)
                 common_searcher.stop_searching_any(unique_are_common_nodes)
 



More information about the bazaar-commits mailing list