1
# groupcompress, a bzr plugin providing new compression logic.
2
# Copyright (C) 2008 Canonical Limited.
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.
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.
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
18
"""groupcompress will provide smaller bzr repositories.
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
31
See DESIGN in the groupcompress source.
36
from bzrlib.bzrdir import format_registry
37
from bzrlib.repository import format_registry as repo_registry
38
format_registry.register_metadir('gc-plain',
39
'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlain',
40
help='pack-0.92 with btree index and group compress. '
42
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
44
branch_format='bzrlib.branch.BzrBranchFormat7',
45
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
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. '
54
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
56
branch_format='bzrlib.branch.BzrBranchFormat7',
57
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
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. '
66
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
68
branch_format='bzrlib.branch.BzrBranchFormat7',
69
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
74
# if we have chk support in bzrlib, use it. Otherwise don't register cause 'bzr
75
# info' will die horribly.
77
from bzrlib.repofmt.pack_repo import (
78
RepositoryFormatPackDevelopment5,
79
RepositoryFormatPackDevelopment5Hash16,
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. '
85
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
87
branch_format='bzrlib.branch.BzrBranchFormat7',
88
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
92
repo_registry.register_lazy(
93
'Bazaar development format - chk+gc (needs bzr.dev from 1.13)\n',
94
'bzrlib.plugins.groupcompress.repofmt',
95
'RepositoryFormatPackGCPlainCHK',
97
format_registry.register_metadir('gc-plain-chk16',
98
'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK16',
99
help='pack-1.9 with 16-way hashed CHK inv and group compress. '
101
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
103
branch_format='bzrlib.branch.BzrBranchFormat7',
104
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
108
repo_registry.register_lazy(
109
'Bazaar development format - hash16chk+gc (needs bzr.dev from 1.13)\n',
110
'bzrlib.plugins.groupcompress.repofmt',
111
'RepositoryFormatPackGCPlainCHK16',
116
repo_registry.register_lazy(
117
'Bazaar development format - btree+gc (needs bzr.dev from 1.6)\n',
118
'bzrlib.plugins.groupcompress.repofmt',
119
'RepositoryFormatPackGCPlain',
121
repo_registry.register_lazy(
122
'Bazaar development format - btree+gc-rich-root (needs bzr.dev from 1.6)\n',
123
'bzrlib.plugins.groupcompress.repofmt',
124
'RepositoryFormatPackGCRichRoot',
126
repo_registry.register_lazy(
127
'Bazaar development format - btree+gc-subtrees (needs bzr.dev from 1.6)\n',
128
'bzrlib.plugins.groupcompress.repofmt',
129
'RepositoryFormatPackGCSubtrees',
135
# Thunk across to load_tests for niceness with older bzr versions
136
from bzrlib.tests import TestLoader
137
loader = TestLoader()
138
return loader.loadTestsFromModuleNames(['bzrlib.plugins.groupcompress'])
141
def load_tests(standard_tests, module, loader):
142
standard_tests.addTests(loader.loadTestsFromModuleNames(
143
['bzrlib.plugins.groupcompress.tests']))
144
return standard_tests