/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/store/versioned/__init__.py

 * New ``versionedfile.KeyMapper`` interface to abstract out the access to
   underyling .knit/.kndx etc files in repositories with partitioned
   storage. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
                if relpath.endswith(suffix):
70
70
                    # TODO: use standard remove_suffix function
71
71
                    escaped_id = os.path.basename(relpath[:-len(suffix)])
72
 
                    file_id = self._unescape(escaped_id)
 
72
                    file_id = self._mapper.unmap(escaped_id)[0]
73
73
                    if file_id not in ids:
74
74
                        ids.add(file_id)
75
75
                        yield file_id
153
153
                # unexpected error - NoSuchFile is expected to be raised on a
154
154
                # missing dir only and that only occurs when we are prefixed.
155
155
                raise
156
 
            self._transport.mkdir(self.hash_prefix(file_id), mode=self._dir_mode)
 
156
            dirname = osutils.dirname(_filename)
 
157
            self._transport.mkdir(dirname, mode=self._dir_mode)
157
158
            weave = self._versionedfile_class(_filename, self._transport,
158
159
                                              self._file_mode, create=True,
159
160
                                              get_scope=self.get_scope,