~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/weaverepo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from cStringIO import StringIO
25
25
import urllib
26
26
 
 
27
from bzrlib.lazy_import import lazy_import
 
28
lazy_import(globals(), """
 
29
from bzrlib import (
 
30
    xml5,
 
31
    )
 
32
""")
27
33
from bzrlib import (
28
34
    bzrdir,
29
35
    debug,
35
41
    versionedfile,
36
42
    weave,
37
43
    weavefile,
38
 
    xml5,
39
44
    )
40
45
from bzrlib.decorators import needs_read_lock, needs_write_lock
41
46
from bzrlib.repository import (
58
63
class AllInOneRepository(Repository):
59
64
    """Legacy support - the repository behaviour for all-in-one branches."""
60
65
 
61
 
    _serializer = xml5.serializer_v5
 
66
    @property
 
67
    def _serializer(self):
 
68
        return xml5.serializer_v5
62
69
 
63
70
    def __init__(self, _format, a_bzrdir):
64
71
        # we reuse one control files instance.
177
184
class WeaveMetaDirRepository(MetaDirVersionedFileRepository):
178
185
    """A subclass of MetaDirRepository to set weave specific policy."""
179
186
 
180
 
    _serializer = xml5.serializer_v5
 
187
    @property
 
188
    def _serializer(self):
 
189
        return xml5.serializer_v5
181
190
 
182
191
    def __init__(self, _format, a_bzrdir, control_files):
183
192
        super(WeaveMetaDirRepository, self).__init__(_format, a_bzrdir, control_files)