Rev 3108: Don't search for ancestors if there are no more new nodes in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/graph_update

John Arbash Meinel john at arbash-meinel.com
Thu Dec 20 16:08:21 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/graph_update

------------------------------------------------------------
revno: 3108
revision-id:john at arbash-meinel.com-20071220160509-tdn1gp49n31zyf4e
parent: john at arbash-meinel.com-20071220155436-uyp6ffwyztyphzwv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: graph_update
timestamp: Thu 2007-12-20 10:05:09 -0600
message:
  Don't search for ancestors if there are no more new nodes
modified:
  bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
-------------- next part --------------
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py	2007-12-20 15:54:36 +0000
+++ b/bzrlib/graph.py	2007-12-20 16:05:09 +0000
@@ -419,13 +419,15 @@
             # After we stop searching nodes, figure out what the next nodes are
             # going to be, so we can preload them
             next_to_search = set()
+            if new_common:
+                for searcher in searchers.itervalues():
+                    seen_ancestors = searcher.find_seen_ancestors(new_common)
+                    searcher.stop_searching_any(seen_ancestors)
+                    # Make sure to put all seen ancestors into the common set. This
+                    # will allow the common_walker to jump past them.
+                    new_common.update(seen_ancestors)
             for searcher in searchers.itervalues():
-                seen_ancestors = searcher.find_seen_ancestors(new_common)
-                searcher.stop_searching_any(seen_ancestors)
                 next_to_search.update(searcher.will_search())
-                # Make sure to put all seen ancestors into the common set. This
-                # will allow the common_walker to jump past them.
-                new_common.update(seen_ancestors)
             common_walker.start_searching(new_common)
             next_to_search.update(common_walker.will_search())
         return candidate_heads



More information about the bazaar-commits mailing list