Rev 2890: (robertc) Reduce object creation volume during commit by reusing the repository graph object. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Oct 5 04:26:21 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2890
revision-id: pqm at pqm.ubuntu.com-20071005032619-b6c99y625rawducb
parent: pqm at pqm.ubuntu.com-20071004223314-qpih4e2os3o2627a
parent: robertc at robertcollins.net-20071004222814-1ejg4uepydfbacew
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-10-05 04:26:19 +0100
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
------------------------------------------------------------
revno: 2776.1.7.1.20
merged: 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 file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-04 01:24:06 +0000
+++ b/bzrlib/repository.py 2007-10-05 03:26:19 +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.
@@ -292,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.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