~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

First cut at pluralised VersionedFiles. Some rather massive API incompatabilities, primarily because of the difficulty of coherence among competing stores.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
    def _put_weave(self, file_id, weave, transaction):
180
180
        """Preserved here for upgrades-to-weaves to use."""
181
181
        myweave = self._make_new_versionedfile(file_id, transaction)
182
 
        myweave.insert_record_stream(weave.get_record_stream(weave.versions(),
 
182
        myweave.insert_record_stream(weave.get_record_stream(
 
183
            [(version,) for version in weave.versions()],
183
184
            'topological', False))
184
185
 
185
 
    def copy(self, source, result_id, transaction):
186
 
        """Copy the source versioned file to result_id in this store."""
187
 
        source.copy_to(self.filename(result_id), self._transport)
188
 
 
189
186
    def copy_all_ids(self, store_from, pb=None, from_transaction=None,
190
187
                     to_transaction=None):
191
188
        """Copy all the file ids from store_from into self."""
242
239
                target = self._make_new_versionedfile(f, to_transaction)
243
240
                source = from_store.get_weave(f, from_transaction)
244
241
                target.insert_record_stream(source.get_record_stream(
245
 
                    source.versions(), 'topological', False))
 
242
                    [(version,) for version in source.versions()],
 
243
                    'topological', False))
246
244
        finally:
247
245
            pb.finished()
248
246