~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/weaverepo.py

  • Committer: Aaron Bentley
  • Date: 2008-04-24 04:58:42 UTC
  • mfrom: (3377 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3380.
  • Revision ID: aaron@aaronbentley.com-20080424045842-0cajl9v6s4u52kaw
Merge 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,
77
77
            self.inventory_store = get_store('inventory-store')
78
78
            text_store = get_store('text-store')
79
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
80
83
 
81
84
    @needs_read_lock
82
85
    def _all_possible_ids(self):
202
205
        :param new_value: True to restore the default, False to disable making
203
206
                          working trees.
204
207
        """
205
 
        raise NotImplementedError(self.set_make_working_trees)
206
 
    
 
208
        raise errors.RepositoryUpgradeRequired(self.bzrdir.root_transport.base)
 
209
 
207
210
    def make_working_trees(self):
208
211
        """Returns the policy for making working trees on new branches."""
209
212
        return True
214
217
        return False
215
218
 
216
219
 
217
 
class WeaveMetaDirRepository(MetaDirRepository):
 
220
class WeaveMetaDirRepository(MetaDirVersionedFileRepository):
218
221
    """A subclass of MetaDirRepository to set weave specific policy."""
219
222
 
220
223
    _serializer = xml5.serializer_v5
629
632
        result = versionedfile.add_lines(
630
633
            self._new_revision_id, parents, new_lines,
631
634
            nostore_sha=nostore_sha)[0:2]
632
 
        versionedfile.clear_cache()
633
635
        return result
634
636
 
635
637