Rev 2803: (robertc) Reduce object creation volume during commit by reusing the repository graph object. (Robert Collins) in http://people.ubuntu.com/~robertc/baz2.0/commit
Robert Collins
robertc at robertcollins.net
Thu Oct 4 23:28:18 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/commit
------------------------------------------------------------
revno: 2803
revision-id: robertc at robertcollins.net-20071004222814-1ejg4uepydfbacew
parent: robertc at robertcollins.net-20071003042301-a8uqkwlqr5owcqbo
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit
timestamp: Fri 2007-10-05 08:28:14 +1000
message:
(robertc) Reduce object creation volume during commit by reusing the repository graph object. (Robert Collins)
modified:
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-03 04:23:01 +0000
+++ b/bzrlib/repository.py 2007-10-04 22:28:14 +0000
@@ -115,6 +115,7 @@
self._timezone = int(timezone)
self._generate_revision_if_needed()
+ self._repo_graph = repository.get_graph()
def commit(self, message):
"""Make the actual commit.
@@ -255,7 +256,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.repository.get_graph().heads(parent_candiate_entries.keys())
+ head_set = self._repo_graph.heads(parent_candiate_entries.keys())
heads = []
for inv in parent_invs:
if ie.file_id in inv:
More information about the bazaar-commits
mailing list