~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_btree_serializer_pyx.pyx

Add another quick check, since key_length must be 1 for chk keys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
                                                   last - self._start)))
184
184
                    raise AssertionError(failure_string)
185
185
            # capture the key string
186
 
            if ((temp_ptr - self._start) == 45
 
186
            if (self.key_length == 1 
 
187
                and (temp_ptr - self._start) == 45
187
188
                and strncmp(self._start, 'sha1:', 5) == 0):
188
189
                key_element = safe_string_from_size(self._start,
189
190
                                                    temp_ptr - self._start)