/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
5582.10.1 by Jelmer Vernooij
Move weave formats into bzrlib.plugins.weave_fmt.
1
# Copyright (C) 2010 Canonical Ltd
2
#
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17
"""Weave formats.
18
19
These were formats present in pre-1.0 version of Bazaar.
20
"""
21
22
from bzrlib import (
23
    branch,
24
    bzrdir,
25
    controldir,
26
    repository,
5582.10.65 by Jelmer Vernooij
Merge working tree format registry.
27
    serializer,
5582.10.39 by Jelmer Vernooij
Merge extra wt formats.
28
    workingtree,
5582.10.1 by Jelmer Vernooij
Move weave formats into bzrlib.plugins.weave_fmt.
29
    )
30
31
# Pre-0.8 formats that don't have a disk format string (because they are
32
# versioned by the matching control directory). We use the control directories
33
# disk format string as a key for the network_name because they meet the
34
# constraints (simple string, unique, immutable).
35
repository.network_format_registry.register_lazy(
36
    "Bazaar-NG branch, format 5\n",
37
    'bzrlib.plugins.weave_fmt.repository',
38
    'RepositoryFormat5',
39
)
40
repository.network_format_registry.register_lazy(
41
    "Bazaar-NG branch, format 6\n",
42
    'bzrlib.plugins.weave_fmt.repository',
43
    'RepositoryFormat6',
44
)
45
46
# weave formats which has no format string and are not discoverable or independently
47
# creatable on disk, so are not registered in format_registry.  They're
48
# all in bzrlib.plugins.weave_fmt.repository now.  When an instance of one of these is
49
# needed, it's constructed directly by the BzrDir.  Non-native formats where
50
# the repository is not separately opened are similar.
51
52
repository.format_registry.register_lazy(
53
    'Bazaar-NG Repository format 7',
54
    'bzrlib.plugins.weave_fmt.repository',
55
    'RepositoryFormat7'
56
    )
57
5582.10.43 by Jelmer Vernooij
Merge extra repo branch.
58
repository.format_registry.register_extra_lazy(
5582.10.44 by Jelmer Vernooij
Clean up patch.
59
    'bzrlib.plugins.weave_fmt.repository',
5582.10.43 by Jelmer Vernooij
Merge extra repo branch.
60
    'RepositoryFormat4')
61
repository.format_registry.register_extra_lazy(
5582.10.44 by Jelmer Vernooij
Clean up patch.
62
    'bzrlib.plugins.weave_fmt.repository',
5582.10.43 by Jelmer Vernooij
Merge extra repo branch.
63
    'RepositoryFormat5')
64
repository.format_registry.register_extra_lazy(
5582.10.44 by Jelmer Vernooij
Clean up patch.
65
    'bzrlib.plugins.weave_fmt.repository',
5582.10.43 by Jelmer Vernooij
Merge extra repo branch.
66
    'RepositoryFormat6')
67
5582.10.1 by Jelmer Vernooij
Move weave formats into bzrlib.plugins.weave_fmt.
68
69
# The pre-0.8 formats have their repository format network name registered in
70
# repository.py. MetaDir formats have their repository format network name
71
# inferred from their disk format string.
72
controldir.format_registry.register_lazy('weave',
73
    "bzrlib.plugins.weave_fmt.bzrdir", "BzrDirFormat6",
74
    'Pre-0.8 format.  Slower than knit and does not'
75
    ' support checkouts or shared repositories.',
76
    hidden=True,
77
    deprecated=True)
78
bzrdir.register_metadir(controldir.format_registry, 'metaweave',
79
    'bzrlib.plugins.weave_fmt.repository.RepositoryFormat7',
80
    'Transitional format in 0.8.  Slower than knit.',
81
    branch_format='bzrlib.branch.BzrBranchFormat5',
82
    tree_format='bzrlib.workingtree.WorkingTreeFormat3',
83
    hidden=True,
84
    deprecated=True)
85
86
5582.10.93 by Jelmer Vernooij
merge bzrdir-weave.
87
bzrdir.BzrProber.formats.register_lazy(
5582.10.90 by Jelmer Vernooij
Merge weave-bzrdir branch.
88
    "Bazaar-NG branch, format 0.0.4\n", "bzrlib.plugins.weave_fmt.bzrdir",
89
    "BzrDirFormat4")
5582.10.93 by Jelmer Vernooij
merge bzrdir-weave.
90
bzrdir.BzrProber.formats.register_lazy(
5582.10.90 by Jelmer Vernooij
Merge weave-bzrdir branch.
91
    "Bazaar-NG branch, format 5\n", "bzrlib.plugins.weave_fmt.bzrdir",
92
    "BzrDirFormat5")
5582.10.93 by Jelmer Vernooij
merge bzrdir-weave.
93
bzrdir.BzrProber.formats.register_lazy(
5582.10.90 by Jelmer Vernooij
Merge weave-bzrdir branch.
94
    "Bazaar-NG branch, format 6\n", "bzrlib.plugins.weave_fmt.bzrdir",
95
    "BzrDirFormat6")
96
5582.10.1 by Jelmer Vernooij
Move weave formats into bzrlib.plugins.weave_fmt.
97
5582.10.66 by Jelmer Vernooij
Merge BranchFormatRegistry branch.
98
branch.format_registry.register_extra_lazy(
99
    'bzrlib.plugins.weave_fmt.branch', 'BzrBranchFormat4')
5582.10.70 by Jelmer Vernooij
merge bzr.dev.
100
branch.network_format_registry.register_lazy(
101
    "Bazaar-NG branch, format 6\n",
102
    'bzrlib.plugins.weave_fmt.branch', "BzrBranchFormat4")
103
5582.10.83 by Jelmer Vernooij
merge weave-branch branch.
104
5582.10.65 by Jelmer Vernooij
Merge working tree format registry.
105
workingtree.format_registry.register_extra_lazy(
106
    'bzrlib.plugins.weave_fmt.workingtree',
107
    'WorkingTreeFormat2')
5582.10.39 by Jelmer Vernooij
Merge extra wt formats.
108
5582.10.65 by Jelmer Vernooij
Merge working tree format registry.
109
serializer.format_registry.register_lazy('4', 'bzrlib.plugins.weave_fmt.xml4',
5582.10.56 by Jelmer Vernooij
move xml4 to weave plugin.
110
    'serializer_v4')
111
5582.10.2 by Jelmer Vernooij
Move weave repository tests.
112
def load_tests(basic_tests, module, loader):
113
    testmod_names = [
5582.10.4 by Jelmer Vernooij
Fix a bunch of tests.
114
        'test_bzrdir',
5582.10.2 by Jelmer Vernooij
Move weave repository tests.
115
        'test_repository',
5582.10.15 by Jelmer Vernooij
Move workingtree tests.
116
        'test_workingtree',
5582.10.2 by Jelmer Vernooij
Move weave repository tests.
117
        ]
118
    basic_tests.addTest(loader.loadTestsFromModuleNames(
119
            ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
120
    return basic_tests