/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.17.1 by Robert Collins
Starting point. Interface tests hooked up and failing.
1
# groupcompress, a bzr plugin providing new compression logic.
2
# Copyright (C) 2008 Canonical Limited.
3
# 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License version 2 as published
6
# by the Free Software Foundation.
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 St, Fifth Floor, Boston, MA  02110-1301 USA
16
# 
17
18
"""groupcompress will provide smaller bzr repositories.
19
20
groupcompress
21
+++++++++++++
22
23
bzr repositories are larger than we want them to be; this tries to implement
24
some of the things we have been considering. The primary logic is deep in the
25
VersionedFiles abstraction, and at this point there is no user visible 
26
facilities.
27
28
Documentation
29
=============
30
0.17.9 by Robert Collins
Initial stab at repository format support.
31
See DESIGN in the groupcompress source.
0.17.1 by Robert Collins
Starting point. Interface tests hooked up and failing.
32
"""
0.17.9 by Robert Collins
Initial stab at repository format support.
33
34
35
36
from bzrlib.bzrdir import format_registry
0.20.1 by John Arbash Meinel
Import repo_registry earlier.
37
from bzrlib.repository import format_registry as repo_registry
0.17.9 by Robert Collins
Initial stab at repository format support.
38
format_registry.register_metadir('gc-plain',
39
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlain',
40
    help='pack-0.92 with btree index and group compress. '
41
        'Please read '
42
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
43
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
44
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
45
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
46
    hidden=False,
47
    experimental=True,
48
    )
49
50
format_registry.register_metadir('gc-rich-root',
51
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCRichRoot',
52
    help='rich-root-pack with btree index and group compress. '
53
        'Please read '
54
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
55
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
56
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
57
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
58
    hidden=False,
59
    experimental=True,
60
    )
61
62
format_registry.register_metadir('gc-subtrees',
63
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCSubtrees',
64
    help='pack-0.92-subtress with btree index and group compress. '
65
        'Please read '
66
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
67
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
68
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
69
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
70
    hidden=False,
71
    experimental=True,
72
    )
73
0.17.29 by Robert Collins
Update for VersionedFiles adapter API change.
74
from bzrlib.repository import format_registry as repo_registry
75
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
76
# if we have chk support in bzrlib, use it. Otherwise don't register cause 'bzr
77
# info' will die horribly.
78
try:
79
    from bzrlib.repofmt.pack_repo import (
0.21.1 by John Arbash Meinel
Start basing the groupcompress chk formats on the dev5 formats.
80
    RepositoryFormatPackDevelopment5,
81
    RepositoryFormatPackDevelopment5Hash16,
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
82
    )
83
    format_registry.register_metadir('gc-plain-chk',
84
        'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK',
85
        help='pack-1.9 with CHK inv and group compress. '
86
            'Please read '
87
            'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
88
            'before use.',
89
        branch_format='bzrlib.branch.BzrBranchFormat7',
0.21.1 by John Arbash Meinel
Start basing the groupcompress chk formats on the dev5 formats.
90
        tree_format='bzrlib.workingtree.WorkingTreeFormat5',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
91
        hidden=False,
92
        experimental=True,
93
        )
0.17.28 by Robert Collins
Do not register a chk repository format unless chk is available.
94
    repo_registry.register_lazy(
0.21.1 by John Arbash Meinel
Start basing the groupcompress chk formats on the dev5 formats.
95
        'Bazaar development format - chk+gc (needs bzr.dev from 1.13)\n',
0.17.28 by Robert Collins
Do not register a chk repository format unless chk is available.
96
        'bzrlib.plugins.groupcompress.repofmt',
97
        'RepositoryFormatPackGCPlainCHK',
98
        )
0.21.1 by John Arbash Meinel
Start basing the groupcompress chk formats on the dev5 formats.
99
    format_registry.register_metadir('gc-plain-chk16',
100
        'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK16',
101
        help='pack-1.9 with 16-way hashed CHK inv and group compress. '
102
            'Please read '
103
            'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
104
            'before use.',
105
        branch_format='bzrlib.branch.BzrBranchFormat7',
106
        tree_format='bzrlib.workingtree.WorkingTreeFormat5',
107
        hidden=False,
108
        experimental=True,
109
        )
110
    repo_registry.register_lazy(
111
        'Bazaar development format - hash16chk+gc (needs bzr.dev from 1.13)\n',
112
        'bzrlib.plugins.groupcompress.repofmt',
113
        'RepositoryFormatPackGCPlainCHK16',
114
        )
0.21.3 by John Arbash Meinel
Start putting together a GroupCompress format that is built on dev5
115
    format_registry.register_metadir('gc-plain-chk255',
116
        'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK255',
117
        help='pack-1.9 with 255-way hashed CHK inv and group compress. '
118
            'Please read '
119
            'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
120
            'before use.',
121
        branch_format='bzrlib.branch.BzrBranchFormat7',
122
        tree_format='bzrlib.workingtree.WorkingTreeFormat5',
123
        hidden=False,
124
        experimental=True,
125
        )
126
    repo_registry.register_lazy(
127
        'Bazaar development format - hash255chk+gc (needs bzr.dev from 1.13)\n',
128
        'bzrlib.plugins.groupcompress.repofmt',
129
        'RepositoryFormatPackGCPlainCHK255',
130
        )
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
131
except ImportError:
132
    pass
133
0.17.9 by Robert Collins
Initial stab at repository format support.
134
repo_registry.register_lazy(
135
    'Bazaar development format - btree+gc (needs bzr.dev from 1.6)\n',
136
    'bzrlib.plugins.groupcompress.repofmt',
137
    'RepositoryFormatPackGCPlain',
138
    )
139
repo_registry.register_lazy(
140
    'Bazaar development format - btree+gc-rich-root (needs bzr.dev from 1.6)\n',
141
    'bzrlib.plugins.groupcompress.repofmt',
142
    'RepositoryFormatPackGCRichRoot',
143
    )
144
repo_registry.register_lazy(
145
    'Bazaar development format - btree+gc-subtrees (needs bzr.dev from 1.6)\n',
146
    'bzrlib.plugins.groupcompress.repofmt',
147
    'RepositoryFormatPackGCSubtrees',
148
    )
149
150
151
0.17.1 by Robert Collins
Starting point. Interface tests hooked up and failing.
152
def test_suite():
153
    # Thunk across to load_tests for niceness with older bzr versions
154
    from bzrlib.tests import TestLoader
155
    loader = TestLoader()
156
    return loader.loadTestsFromModuleNames(['bzrlib.plugins.groupcompress'])
157
158
159
def load_tests(standard_tests, module, loader):
160
    standard_tests.addTests(loader.loadTestsFromModuleNames(
161
        ['bzrlib.plugins.groupcompress.tests']))
162
    return standard_tests