Rev 2952: Remove temporary basis_inv variable no longer used by record_entry_contents. in http://people.ubuntu.com/~robertc/baz2.0/commit-builder
Robert Collins
robertc at robertcollins.net
Sat Oct 27 02:33:27 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/commit-builder
------------------------------------------------------------
revno: 2952
revision-id:robertc at robertcollins.net-20071027013322-l98rwi4wt9ngf4ld
parent: robertc at robertcollins.net-20071027013146-qr1z925yj15eozug
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit-builder
timestamp: Sat 2007-10-27 11:33:22 +1000
message:
Remove temporary basis_inv variable no longer used by record_entry_contents.
modified:
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-27 01:31:46 +0000
+++ b/bzrlib/repository.py 2007-10-27 01:33:22 +0000
@@ -198,7 +198,7 @@
# _new_revision_id
ie.revision = self._new_revision_id
- def _get_delta(self, ie, basis_inv, path, basis_ie, basis_path):
+ def _get_delta(self, ie, path, basis_ie, basis_path):
"""Get a delta against the basis inventory for ie."""
if basis_ie is None or ie != basis_ie:
# add/changed
@@ -258,9 +258,6 @@
raise NotImplementedError('Missing repository subtree support.')
self.new_inventory.add(ie)
- # TODO: slow, take it out of the inner loop.
- basis_inv = parent_invs[0]
-
# ie.revision is always None if the InventoryEntry is considered
# for committing. We may record the previous parents revision if the
# content is actually unchanged against a sole head.
@@ -328,7 +325,7 @@
ie.text_size = parent_entry.text_size
ie.text_sha1 = parent_entry.text_sha1
ie.executable = parent_entry.executable
- return self._get_delta(ie, basis_inv, path, basis_ie,
+ return self._get_delta(ie, path, basis_ie,
basis_path), False
else:
# Either there is only a hash change(no hash cache entry,
@@ -354,14 +351,14 @@
ie.text_size = parent_entry.text_size
ie.text_sha1 = parent_entry.text_sha1
ie.executable = parent_entry.executable
- return self._get_delta(ie, basis_inv, path, basis_ie,
+ return self._get_delta(ie, path, basis_ie,
basis_path), False
elif kind == 'directory':
if not store:
# all data is meta here, nothing specific to directory, so
# carry over:
ie.revision = parent_entry.revision
- return self._get_delta(ie, basis_inv, path, basis_ie,
+ return self._get_delta(ie, path, basis_ie,
basis_path), False
lines = []
self._add_text_to_weave(ie.file_id, lines, heads, None)
@@ -376,7 +373,7 @@
# unchanged, carry over.
ie.revision = parent_entry.revision
ie.symlink_target = parent_entry.symlink_target
- return self._get_delta(ie, basis_inv, path, basis_ie,
+ return self._get_delta(ie, path, basis_ie,
basis_path), False
ie.symlink_target = current_link_target
lines = []
@@ -389,7 +386,7 @@
# unchanged, carry over.
ie.reference_revision = parent_entry.reference_revision
ie.revision = parent_entry.revision
- return self._get_delta(ie, basis_inv, path, basis_ie,
+ return self._get_delta(ie, path, basis_ie,
basis_path), False
ie.reference_revision = content_summary[3]
lines = []
@@ -397,7 +394,7 @@
else:
raise NotImplementedError('unknown kind')
ie.revision = self._new_revision_id
- return self._get_delta(ie, basis_inv, path, basis_ie, basis_path), True
+ return self._get_delta(ie, path, basis_ie, basis_path), True
def _add_text_to_weave(self, file_id, new_lines, parents, nostore_sha):
versionedfile = self.repository.weave_store.get_weave_or_empty(
More information about the bazaar-commits
mailing list