Rev 3671: Rename _parse_btree to _btree_serializer in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/btree
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 22 03:18:29 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/btree
------------------------------------------------------------
revno: 3671
revision-id: john at arbash-meinel.com-20080822021827-682x4linhe28stky
parent: john at arbash-meinel.com-20080822020936-gtpffetj2a7xkw0x
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: btree
timestamp: Thu 2008-08-21 21:18:27 -0500
message:
Rename _parse_btree to _btree_serializer
renamed:
bzrlib/_parse_btree_c.pyx => bzrlib/_btree_serializer_c.pyx _parse_btree_c.pyx-20080703034413-3q25bklkenti3p8p-2
bzrlib/_parse_btree_py.py => bzrlib/_btree_serializer_py.py _parse_btree_py.py-20080703034413-3q25bklkenti3p8p-3
modified:
.bzrignore bzrignore-20050311232317-81f7b71efa2db11a
bzrlib/btree_index.py index.py-20080624222253-p0x5f92uyh5hw734-7
bzrlib/tests/test_btree_index.py test_index.py-20080624222253-p0x5f92uyh5hw734-13
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
-------------- next part --------------
=== modified file '.bzrignore'
--- a/.bzrignore 2008-08-19 23:12:01 +0000
+++ b/.bzrignore 2008-08-22 02:18:27 +0000
@@ -38,9 +38,9 @@
./api
doc/**/*.html
doc/developers/performance.png
+bzrlib/_btree_serializer_c.c
bzrlib/_dirstate_helpers_c.c
bzrlib/_knit_load_data_c.c
-bzrlib/_parse_btree_c.c
bzrlib/_walkdirs_win32.c
doc/en/release-notes/NEWS.txt
doc/en/developer-guide/HACKING.txt
=== renamed file 'bzrlib/_parse_btree_c.pyx' => 'bzrlib/_btree_serializer_c.pyx'
=== renamed file 'bzrlib/_parse_btree_py.py' => 'bzrlib/_btree_serializer_py.py'
=== modified file 'bzrlib/btree_index.py'
--- a/bzrlib/btree_index.py 2008-08-22 02:09:36 +0000
+++ b/bzrlib/btree_index.py 2008-08-22 02:18:27 +0000
@@ -331,8 +331,8 @@
# and then do a single malloc() rather than lots of
# intermediate mallocs as we build everything up.
# ATM 3 / 13s are spent flattening nodes (10s is compressing)
- string_key, line = _parse_btree._flatten_node(node,
- self.reference_lists)
+ string_key, line = _btree_serializer._flatten_node(node,
+ self.reference_lists)
self._add_key(string_key, line, rows)
for row in reversed(rows):
pad = (type(row) != _LeafBuilderRow)
@@ -524,7 +524,7 @@
def __init__(self, bytes, key_length, ref_list_length):
"""Parse bytes to create a leaf node object."""
# splitlines mangles the \r delimiters.. don't use it.
- self.keys = dict(_parse_btree._parse_leaf_lines(bytes,
+ self.keys = dict(_btree_serializer._parse_leaf_lines(bytes,
key_length, ref_list_length))
@@ -1106,6 +1106,6 @@
try:
- from bzrlib import _parse_btree_c as _parse_btree
+ from bzrlib import _btree_serializer_c as _btree_serializer
except ImportError:
- from bzrlib import _parse_btree_py as _parse_btree
+ from bzrlib import _btree_serializer_py as _btree_serializer
=== modified file 'bzrlib/tests/test_btree_index.py'
--- a/bzrlib/tests/test_btree_index.py 2008-08-22 02:09:36 +0000
+++ b/bzrlib/tests/test_btree_index.py 2008-08-22 02:18:27 +0000
@@ -40,12 +40,12 @@
node_tests, others = split_suite_by_condition(standard_tests,
condition_isinstance(TestBTreeNodes))
applier = TestScenarioApplier()
- import bzrlib._parse_btree_py as py_module
+ import bzrlib._btree_serializer_py as py_module
applier.scenarios = [('python', {'parse_btree': py_module})]
if CompiledBtreeParserFeature.available():
# Is there a way to do this that gets missing feature failures rather
# than no indication to the user?
- import bzrlib._parse_btree_c as c_module
+ import bzrlib._btree_serializer_c as c_module
applier.scenarios.append(('C', {'parse_btree': c_module}))
adapt_tests(node_tests, applier, others)
return others
@@ -54,13 +54,13 @@
class _CompiledBtreeParserFeature(tests.Feature):
def _probe(self):
try:
- import bzrlib._parse_btree_c
+ import bzrlib._btree_serializer_c
except ImportError:
return False
return True
def feature_name(self):
- return 'bzrlib._parse_btree_c'
+ return 'bzrlib._btree_serializer_c'
CompiledBtreeParserFeature = _CompiledBtreeParserFeature()
@@ -265,7 +265,7 @@
"B+Tree Graph Index 2\nnode_ref_lists=0\nkey_elements=1\nlen=800\n"
"row_lengths=1,2\n",
content[:77])
- # Check thelast page is well formed
+ # Check the last page is well formed
leaf2 = content[8192:]
leaf2_bytes = zlib.decompress(leaf2)
node = btree_index._LeafNode(leaf2_bytes, 1, 0)
@@ -827,13 +827,13 @@
class TestBTreeNodes(BTreeTestCase):
def restore_parser(self):
- btree_index._parse_btree = self.saved_parser
+ btree_index._btree_serializer = self.saved_parser
def setUp(self):
BTreeTestCase.setUp(self)
- self.saved_parser = btree_index._parse_btree
+ self.saved_parser = btree_index._btree_serializer
self.addCleanup(self.restore_parser)
- btree_index._parse_btree = self.parse_btree
+ btree_index._btree_serializer = self.parse_btree
def test_LeafNode_1_0(self):
node_bytes = ("type=leaf\n"
=== modified file 'setup.py'
--- a/setup.py 2008-08-19 23:12:01 +0000
+++ b/setup.py 2008-08-22 02:18:27 +0000
@@ -225,9 +225,9 @@
ext_modules.append(Extension(module_name, [c_name], **kwargs))
+add_pyrex_extension('bzrlib._btree_serializer_c')
add_pyrex_extension('bzrlib._dirstate_helpers_c')
add_pyrex_extension('bzrlib._knit_load_data_c')
-add_pyrex_extension('bzrlib._parse_btree_c')
if sys.platform == 'win32':
# pyrex uses the macro WIN32 to detect the platform, even though it should
# be using something like _WIN32 or MS_WINDOWS, oh well, we can give it the
More information about the bazaar-commits
mailing list