Rev 4420: Switch to using a single code path for from_dict(). in http://bazaar.launchpad.net/~jameinel/bzr/1.16-chk-direct

John Arbash Meinel john at arbash-meinel.com
Mon Jun 8 19:17:45 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.16-chk-direct

------------------------------------------------------------
revno: 4420
revision-id: john at arbash-meinel.com-20090608181741-qznlkpr8wi6kz8q6
parent: john at arbash-meinel.com-20090608181508-p2p2oqiy9e6bu0in
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-chk-direct
timestamp: Mon 2009-06-08 13:17:41 -0500
message:
  Switch to using a single code path for from_dict().
  Remove an extra pdb.set_trace() statement.
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py	2009-06-08 17:33:56 +0000
+++ b/bzrlib/chk_map.py	2009-06-08 18:17:41 +0000
@@ -203,18 +203,18 @@
             multiple pages.
         :return: The root chk of the resulting CHKMap.
         """
-        root_key = klass._create_via_map(store, initial_value,
-            maximum_size=maximum_size, key_width=key_width,
-            search_key_func=search_key_func)
-        alt_root_key = klass._create_directly(store, initial_value,
-            maximum_size=maximum_size, key_width=key_width,
-            search_key_func=search_key_func)
-        if root_key != alt_root_key:
-            result1 = klass(store, root_key, search_key_func=search_key_func)
-            result2 = klass(store, alt_root_key,
-                            search_key_func=search_key_func)
-            import pdb; pdb.set_trace()
-            raise ValueError('Failed to serialize via leaf splitting.')
+        # root_key = klass._create_via_map(store, initial_value,
+        #     maximum_size=maximum_size, key_width=key_width,
+        #     search_key_func=search_key_func)
+        root_key = klass._create_directly(store, initial_value,
+            maximum_size=maximum_size, key_width=key_width,
+            search_key_func=search_key_func)
+        # if root_key != alt_root_key:
+        #     result1 = klass(store, root_key, search_key_func=search_key_func)
+        #     result2 = klass(store, alt_root_key,
+        #                     search_key_func=search_key_func)
+        #     import pdb; pdb.set_trace()
+        #     raise ValueError('Failed to serialize via leaf splitting.')
         return root_key
 
     @classmethod
@@ -868,7 +868,6 @@
         self._key = ("sha1:" + sha1,)
         bytes = ''.join(lines)
         if len(bytes) != self._current_size():
-            import pdb; pdb.set_trace()
             raise AssertionError('Invalid _current_size')
         _page_cache.add(self._key, bytes)
         return [self._key]



More information about the bazaar-commits mailing list