/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
37
format_registry.register_metadir('gc-plain',
38
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlain',
39
    help='pack-0.92 with btree index and group compress. '
40
        'Please read '
41
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
42
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
43
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
44
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
45
    hidden=False,
46
    experimental=True,
47
    )
48
49
format_registry.register_metadir('gc-rich-root',
50
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCRichRoot',
51
    help='rich-root-pack with btree index and group compress. '
52
        'Please read '
53
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
54
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
55
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
56
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
57
    hidden=False,
58
    experimental=True,
59
    )
60
61
format_registry.register_metadir('gc-subtrees',
62
    'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCSubtrees',
63
    help='pack-0.92-subtress with btree index and group compress. '
64
        'Please read '
65
        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
66
        'before use.',
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
67
    branch_format='bzrlib.branch.BzrBranchFormat7',
0.17.9 by Robert Collins
Initial stab at repository format support.
68
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
69
    hidden=False,
70
    experimental=True,
71
    )
72
0.17.29 by Robert Collins
Update for VersionedFiles adapter API change.
73
from bzrlib.repository import format_registry as repo_registry
74
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
75
# if we have chk support in bzrlib, use it. Otherwise don't register cause 'bzr
76
# info' will die horribly.
77
try:
78
    from bzrlib.repofmt.pack_repo import (
79
    RepositoryFormatPackDevelopment4,
80
    )
81
    format_registry.register_metadir('gc-plain-chk',
82
        'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK',
83
        help='pack-1.9 with CHK inv and group compress. '
84
            'Please read '
85
            'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
86
            'before use.',
87
        branch_format='bzrlib.branch.BzrBranchFormat7',
88
        tree_format='bzrlib.workingtree.WorkingTreeFormat4',
89
        hidden=False,
90
        experimental=True,
91
        )
0.17.28 by Robert Collins
Do not register a chk repository format unless chk is available.
92
    repo_registry.register_lazy(
93
        'Bazaar development format - chk+gc (needs bzr.dev from 1.12)\n',
94
        'bzrlib.plugins.groupcompress.repofmt',
95
        'RepositoryFormatPackGCPlainCHK',
96
        )
0.17.25 by Robert Collins
Preliminary --gc-plain-chk support.
97
except ImportError:
98
    pass
99
0.17.9 by Robert Collins
Initial stab at repository format support.
100
repo_registry.register_lazy(
101
    'Bazaar development format - btree+gc (needs bzr.dev from 1.6)\n',
102
    'bzrlib.plugins.groupcompress.repofmt',
103
    'RepositoryFormatPackGCPlain',
104
    )
105
repo_registry.register_lazy(
106
    'Bazaar development format - btree+gc-rich-root (needs bzr.dev from 1.6)\n',
107
    'bzrlib.plugins.groupcompress.repofmt',
108
    'RepositoryFormatPackGCRichRoot',
109
    )
110
repo_registry.register_lazy(
111
    'Bazaar development format - btree+gc-subtrees (needs bzr.dev from 1.6)\n',
112
    'bzrlib.plugins.groupcompress.repofmt',
113
    'RepositoryFormatPackGCSubtrees',
114
    )
115
116
117
0.17.1 by Robert Collins
Starting point. Interface tests hooked up and failing.
118
def test_suite():
119
    # Thunk across to load_tests for niceness with older bzr versions
120
    from bzrlib.tests import TestLoader
121
    loader = TestLoader()
122
    return loader.loadTestsFromModuleNames(['bzrlib.plugins.groupcompress'])
123
124
125
def load_tests(standard_tests, module, loader):
126
    standard_tests.addTests(loader.loadTestsFromModuleNames(
127
        ['bzrlib.plugins.groupcompress.tests']))
128
    return standard_tests