Rev 3099: Add all common nodes to the common searcher. in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/graph_update

John Arbash Meinel john at arbash-meinel.com
Sun Dec 9 02:17:12 GMT 2007


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

------------------------------------------------------------
revno: 3099
revision-id:john at arbash-meinel.com-20071209021647-pk4jiyy05x7o9e4m
parent: john at arbash-meinel.com-20071209020452-xms9fcv6vcgwhjf2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: graph_update
timestamp: Sat 2007-12-08 20:16:47 -0600
message:
  Add all common nodes to the common searcher.
  Any seen ancestors of common nodes can be automatically added
  and thus discarded quickly by the common searcher.
  The slight expense is that the next get_parents() call will
  need to grab more than it would have otherwise.
  But they are nodes that the individual searchers have
  already requested, so it should already be cached.
modified:
  bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
-------------- next part --------------
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py	2007-12-09 02:04:52 +0000
+++ b/bzrlib/graph.py	2007-12-09 02:16:47 +0000
@@ -423,6 +423,9 @@
                 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