/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/repofmt/weaverepo.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
 
83
83
        def get_store(name, compressed=True, prefixed=False):
84
84
            # FIXME: This approach of assuming stores are all entirely compressed
85
 
            # or entirely uncompressed is tidy, but breaks upgrade from 
86
 
            # some existing branches where there's a mixture; we probably 
 
85
            # or entirely uncompressed is tidy, but breaks upgrade from
 
86
            # some existing branches where there's a mixture; we probably
87
87
            # still want the option to look for both.
88
88
            relpath = self._escape(name)
89
89
            store = TextStore(a_bzrdir.transport.clone(relpath),
95
95
        # not broken out yet because the controlweaves|inventory_store
96
96
        # and texts bits are still different.
97
97
        if isinstance(_format, RepositoryFormat4):
98
 
            # cannot remove these - there is still no consistent api 
 
98
            # cannot remove these - there is still no consistent api
99
99
            # which allows access to this old info.
100
100
            self.inventory_store = get_store('inventory-store')
101
101
            self._text_store = get_store('text-store')
112
112
 
113
113
    @needs_read_lock
114
114
    def _all_revision_ids(self):
115
 
        """Returns a list of all the revision ids in the repository. 
 
115
        """Returns a list of all the revision ids in the repository.
116
116
 
117
 
        These are in as much topological order as the underlying store can 
 
117
        These are in as much topological order as the underlying store can
118
118
        present: for weaves ghosts may lead to a lack of correctness until
119
119
        the reweave updates the parents list.
120
120
        """
210
210
 
211
211
    @needs_read_lock
212
212
    def _all_revision_ids(self):
213
 
        """Returns a list of all the revision ids in the repository. 
 
213
        """Returns a list of all the revision ids in the repository.
214
214
 
215
 
        These are in as much topological order as the underlying store can 
 
215
        These are in as much topological order as the underlying store can
216
216
        present: for weaves ghosts may lead to a lack of correctness until
217
217
        the reweave updates the parents list.
218
218
        """
282
282
        if not _internal:
283
283
            # always initialized when the bzrdir is.
284
284
            return self.open(a_bzrdir, _found=True)
285
 
        
 
285
 
286
286
        # Create an empty weave
287
287
        sio = StringIO()
288
288
        weavefile.write_weave_v5(weave.Weave(), sio)
289
289
        empty_weave = sio.getvalue()
290
290
 
291
291
        mutter('creating repository in %s.', a_bzrdir.transport.base)
292
 
        
 
292
 
293
293
        # FIXME: RBC 20060125 don't peek under the covers
294
294
        # NB: no need to escape relative paths that are url safe.
295
295
        control_files = lockable_files.LockableFiles(a_bzrdir.transport,
355
355
        """Format 4 is not supported.
356
356
 
357
357
        It is not supported because the model changed from 4 to 5 and the
358
 
        conversion logic is expensive - so doing it on the fly was not 
 
358
        conversion logic is expensive - so doing it on the fly was not
359
359
        feasible.
360
360
        """
361
361
        return False
528
528
 
529
529
        mutter('creating repository in %s.', a_bzrdir.transport.base)
530
530
        dirs = ['revision-store', 'weaves']
531
 
        files = [('inventory.weave', StringIO(empty_weave)), 
 
531
        files = [('inventory.weave', StringIO(empty_weave)),
532
532
                 ]
533
533
        utf8_files = [('format', self.get_format_string())]
534
 
 
 
534
 
535
535
        self._upload_blank_content(a_bzrdir, dirs, files, utf8_files, shared)
536
536
        return self.open(a_bzrdir=a_bzrdir, _found=True)
537
537
 
538
538
    def open(self, a_bzrdir, _found=False, _override_transport=None):
539
539
        """See RepositoryFormat.open().
540
 
        
 
540
 
541
541
        :param _override_transport: INTERNAL USE ONLY. Allows opening the
542
542
                                    repository at a slightly different url
543
543
                                    than normal. I.e. during 'upgrade'.
664
664
                continue
665
665
            result[key] = parents
666
666
        return result
667
 
    
 
667
 
668
668
    def get_record_stream(self, keys, sort_order, include_delta_closure):
669
669
        for key in keys:
670
670
            text, parents = self._load_text_parents(key)
704
704
                continue
705
705
            result[key] = None
706
706
        return result
707
 
    
 
707
 
708
708
    def get_record_stream(self, keys, sort_order, include_delta_closure):
709
709
        for key in keys:
710
710
            text = self._load_text(key)