/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

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
from bzrlib.decorators import needs_read_lock, needs_write_lock
38
38
from bzrlib.repository import (
39
39
    CommitBuilder,
40
 
    MetaDirRepository,
 
40
    MetaDirVersionedFileRepository,
41
41
    MetaDirRepositoryFormat,
42
42
    Repository,
43
43
    RepositoryFormat,
44
44
    )
45
45
from bzrlib.store.text import TextStore
 
46
from bzrlib.symbol_versioning import deprecated_method, one_four
46
47
from bzrlib.trace import mutter
47
48
 
48
49
 
76
77
            self.inventory_store = get_store('inventory-store')
77
78
            text_store = get_store('text-store')
78
79
        super(AllInOneRepository, self).__init__(_format, a_bzrdir, a_bzrdir._control_files, _revision_store, control_store, text_store)
 
80
        if control_store is not None:
 
81
            control_store.get_scope = self.get_transaction
 
82
        text_store.get_scope = self.get_transaction
79
83
 
80
84
    @needs_read_lock
81
85
    def _all_possible_ids(self):
141
145
            self._check_revision_parents(rev, inv)
142
146
        return revs
143
147
 
 
148
    @deprecated_method(one_four)
144
149
    @needs_read_lock
145
150
    def get_revision_graph(self, revision_id=None):
146
151
        """Return a dictionary containing the revision graph.
200
205
        :param new_value: True to restore the default, False to disable making
201
206
                          working trees.
202
207
        """
203
 
        raise NotImplementedError(self.set_make_working_trees)
204
 
    
 
208
        raise errors.RepositoryUpgradeRequired(self.bzrdir.root_transport.base)
 
209
 
205
210
    def make_working_trees(self):
206
211
        """Returns the policy for making working trees on new branches."""
207
212
        return True
212
217
        return False
213
218
 
214
219
 
215
 
class WeaveMetaDirRepository(MetaDirRepository):
 
220
class WeaveMetaDirRepository(MetaDirVersionedFileRepository):
216
221
    """A subclass of MetaDirRepository to set weave specific policy."""
217
222
 
218
223
    _serializer = xml5.serializer_v5
282
287
        self._check_revision_parents(r, inv)
283
288
        return r
284
289
 
 
290
    @deprecated_method(one_four)
285
291
    @needs_read_lock
286
292
    def get_revision_graph(self, revision_id=None):
287
293
        """Return a dictionary containing the revision graph.
626
632
        result = versionedfile.add_lines(
627
633
            self._new_revision_id, parents, new_lines,
628
634
            nostore_sha=nostore_sha)[0:2]
629
 
        versionedfile.clear_cache()
630
635
        return result
631
636
 
632
637