Rev 4729: Add another quick check, since key_length must be 1 for chk keys. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple
John Arbash Meinel
john at arbash-meinel.com
Thu Oct 1 16:00:14 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple
------------------------------------------------------------
revno: 4729
revision-id: john at arbash-meinel.com-20091001150005-sos54ozqd4w5psam
parent: john at arbash-meinel.com-20090930215359-8gvb6appgkc7j8wz
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-static-tuple
timestamp: Thu 2009-10-01 10:00:05 -0500
message:
Add another quick check, since key_length must be 1 for chk keys.
-------------- next part --------------
=== modified file 'bzrlib/_btree_serializer_pyx.pyx'
--- a/bzrlib/_btree_serializer_pyx.pyx 2009-09-30 21:53:59 +0000
+++ b/bzrlib/_btree_serializer_pyx.pyx 2009-10-01 15:00:05 +0000
@@ -183,7 +183,8 @@
last - self._start)))
raise AssertionError(failure_string)
# capture the key string
- if ((temp_ptr - self._start) == 45
+ if (self.key_length == 1
+ and (temp_ptr - self._start) == 45
and strncmp(self._start, 'sha1:', 5) == 0):
key_element = safe_string_from_size(self._start,
temp_ptr - self._start)
More information about the bazaar-commits
mailing list