Rev 3237: Revert the _get_component_positions api in http://bzr.arbash-meinel.com/branches/bzr/1.3-dev/annotate_cleanup
John Arbash Meinel
john at arbash-meinel.com
Tue Feb 26 22:26:06 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.3-dev/annotate_cleanup
------------------------------------------------------------
revno: 3237
revision-id:john at arbash-meinel.com-20080226222600-6wsja3pv4kelorug
parent: john at arbash-meinel.com-20080220212710-7o35jtg6x1tfb887
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: annotate_cleanup
timestamp: Tue 2008-02-26 16:26:00 -0600
message:
Revert the _get_component_positions api
modified:
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
-------------- next part --------------
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py 2008-02-19 23:18:16 +0000
+++ b/bzrlib/knit.py 2008-02-26 22:26:00 +0000
@@ -895,7 +895,8 @@
noeol) = details
if compression_parent is not None:
pending_components.add(compression_parent)
- component_data[version_id] = details
+ component_data[version_id] = (method, index_memo,
+ compression_parent)
return component_data
def _get_content(self, version_id, parent_texts={}):
@@ -1050,15 +1051,14 @@
position_map = self._get_components_positions(version_ids)
# c = component_id, m = method, i_m = index_memo, n = next
# p = parent_ids, e = noeol
- records = [(c, i_m) for c, (m, i_m, n, p, e)
+ records = [(c, i_m) for c, (m, i_m, n)
in position_map.iteritems()]
record_map = {}
for component_id, content, digest in \
self._data.read_records_iter(records):
- (method, index_memo, next, parent_ids,
- noeol) = position_map[component_id]
+ (method, index_memo, next) = position_map[component_id]
record_map[component_id] = method, content, digest, next
-
+
return record_map
def get_text(self, version_id):
=== modified file 'bzrlib/tests/test_knit.py'
--- a/bzrlib/tests/test_knit.py 2008-02-19 22:18:38 +0000
+++ b/bzrlib/tests/test_knit.py 2008-02-26 22:26:00 +0000
@@ -2102,7 +2102,7 @@
def read_one_raw(version):
pos_map = k._get_components_positions([version])
- method, index_memo, next, parents, noeol= pos_map[version]
+ method, index_memo, next = pos_map[version]
lst = list(k._data.read_records_iter_raw([(version, index_memo)]))
self.assertEqual(1, len(lst))
return lst[0]
@@ -2123,7 +2123,7 @@
def read_one(version):
pos_map = k._get_components_positions([version])
- method, index_memo, next, parents, noeol = pos_map[version]
+ method, index_memo, next = pos_map[version]
lst = list(k._data.read_records_iter([(version, index_memo)]))
self.assertEqual(1, len(lst))
return lst[0]
More information about the bazaar-commits
mailing list