Rev 3001: Respond to Aaron's requests in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/push_packs_to_knits
John Arbash Meinel
john at arbash-meinel.com
Mon Nov 26 19:36:37 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/push_packs_to_knits
------------------------------------------------------------
revno: 3001
revision-id:john at arbash-meinel.com-20071126193511-okj1lcjnltehhq8d
parent: john at arbash-meinel.com-20071117001455-abe9e9k8rb9pu239
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: push_packs_to_knits
timestamp: Mon 2007-11-26 13:35:11 -0600
message:
Respond to Aaron's requests
modified:
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
-------------- next part --------------
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py 2007-11-17 00:14:55 +0000
+++ b/bzrlib/knit.py 2007-11-26 19:35:11 +0000
@@ -2225,7 +2225,7 @@
except AttributeError:
return False
- def _text_by_text_join(self, pb, msg, version_ids, ignore_missing=False):
+ def _copy_texts(self, pb, msg, version_ids, ignore_missing=False):
"""Copy texts to the target by extracting and adding them one by one.
see join() for the parameter definitions.
@@ -2242,8 +2242,10 @@
# TODO: jam 20071116 It would be nice to have a streaming interface to
# get multiple texts from a source. The source could be smarter
# about how it handled intermediate stages.
- # TODO: jam 20071116 Consider using 'get_line_list' instead of lots of
- # calls to get_lines()
+ # get_line_list() or make_mpdiffs() seem like a possibility, but
+ # at the moment they extract all full texts into memory, which
+ # causes us to store more than our 3x fulltext goal.
+ # Repository.iter_files_bytes() may be another possibility
to_process = [version for version in order
if version not in self.target]
total = len(to_process)
@@ -2272,11 +2274,9 @@
elif self.source.factory.annotated:
converter = self._anno_to_plain_converter
else:
- # We're converting from a plain to an annotated knit. This requires
- # building the annotations from scratch. The generic join code
- # handles this implicitly so we delegate to it.
- return self._text_by_text_join(pb, msg, version_ids,
- ignore_missing)
+ # We're converting from a plain to an annotated knit. Copy them
+ # across by full texts.
+ return self._copy_texts(pb, msg, version_ids, ignore_missing)
version_ids = self._get_source_version_ids(version_ids, ignore_missing)
if not version_ids:
More information about the bazaar-commits
mailing list