Rev 2980: Make it possible for different commit builders to override heads(). in http://people.ubuntu.com/~robertc/baz2.0/commit.merge-speed

Robert Collins robertc at robertcollins.net
Mon Nov 12 21:03:10 GMT 2007


At http://people.ubuntu.com/~robertc/baz2.0/commit.merge-speed

------------------------------------------------------------
revno: 2980
revision-id:robertc at robertcollins.net-20071112210301-da1gpusi4p68xhxj
parent: pqm at pqm.ubuntu.com-20071112195430-0xgqswqpc1j2pk2m
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit.merge-speed
timestamp: Tue 2007-11-13 08:03:01 +1100
message:
  Make it possible for different commit builders to override heads().
modified:
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2007-10-31 22:33:53 +0000
+++ b/bzrlib/repository.py	2007-11-12 21:03:01 +0000
@@ -188,6 +188,14 @@
         else:
             self.random_revid = False
 
+    def heads(self, file_id, revision_ids):
+        """Calculate the graph heads for revision_ids in the graph of file_id.
+
+        This can use either a per-file graph or a global revision graph as we
+        have an identity relationship between the two graphs.
+        """
+        return self._heads(revision_ids)
+
     def _check_root(self, ie, parent_invs, tree):
         """Helper for record_entry_contents.
 
@@ -285,7 +293,7 @@
         # XXX: Friction: parent_candidates should return a list not a dict
         #      so that we don't have to walk the inventories again.
         parent_candiate_entries = ie.parent_candidates(parent_invs)
-        head_set = self._heads(parent_candiate_entries.keys())
+        head_set = self.heads(ie.file_id, parent_candiate_entries.keys())
         heads = []
         for inv in parent_invs:
             if ie.file_id in inv:



More information about the bazaar-commits mailing list