~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Andrew Bennetts
  • Date: 2008-02-18 08:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080218083038-tts55zsx5xrz3l2e
Lots of assorted hackery to reduce the number of imports for common operations.  Improves 'rocks', 'st' and 'help' times by ~50ms on my laptop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        graph,
27
27
        pack,
28
28
        ui,
 
29
        xml5,
 
30
        xml6,
 
31
        xml7,
29
32
        )
30
33
from bzrlib.index import (
31
34
    GraphIndex,
42
45
""")
43
46
from bzrlib import (
44
47
    bzrdir,
45
 
    deprecated_graph,
46
48
    errors,
47
49
    knit,
48
50
    lockable_files,
50
52
    osutils,
51
53
    symbol_versioning,
52
54
    transactions,
53
 
    xml5,
54
 
    xml6,
55
 
    xml7,
56
55
    )
57
56
 
58
57
from bzrlib.decorators import needs_read_lock, needs_write_lock
2148
2147
 
2149
2148
    repository_class = KnitPackRepository
2150
2149
    _commit_builder_class = PackCommitBuilder
2151
 
    _serializer = xml5.serializer_v5
 
2150
    @property
 
2151
    def _serializer(self):
 
2152
        return xml5.serializer_v5
2152
2153
 
2153
2154
    def _get_matching_bzrdir(self):
2154
2155
        return bzrdir.format_registry.make_bzrdir('pack-0.92')
2184
2185
    _commit_builder_class = PackRootCommitBuilder
2185
2186
    rich_root_data = True
2186
2187
    supports_tree_reference = True
2187
 
    _serializer = xml7.serializer_v7
 
2188
    @property
 
2189
    def _serializer(self):
 
2190
        return xml7.serializer_v7
2188
2191
 
2189
2192
    def _get_matching_bzrdir(self):
2190
2193
        return bzrdir.format_registry.make_bzrdir(
2225
2228
    _commit_builder_class = PackRootCommitBuilder
2226
2229
    rich_root_data = True
2227
2230
    supports_tree_reference = False
2228
 
    _serializer = xml6.serializer_v6
 
2231
    @property
 
2232
    def _serializer(self):
 
2233
        return xml6.serializer_v6
2229
2234
 
2230
2235
    def _get_matching_bzrdir(self):
2231
2236
        return bzrdir.format_registry.make_bzrdir(