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
format_registry.register_metadir('gc-plain',
38
'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlain',
39
help='pack-0.92 with btree index and group compress. '
41
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
43
branch_format='bzrlib.branch.BzrBranchFormat7',
44
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
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. '
53
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
55
branch_format='bzrlib.branch.BzrBranchFormat7',
56
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
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. '
65
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
67
branch_format='bzrlib.branch.BzrBranchFormat7',
68
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
73
# if we have chk support in bzrlib, use it. Otherwise don't register cause 'bzr
74
# info' will die horribly.
76
from bzrlib.repofmt.pack_repo import (
77
RepositoryFormatPackDevelopment4,
79
format_registry.register_metadir('gc-plain-chk',
80
'bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCPlainCHK',
81
help='pack-1.9 with CHK inv and group compress. '
83
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
85
branch_format='bzrlib.branch.BzrBranchFormat7',
86
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
93
from bzrlib.repository import format_registry as repo_registry
94
repo_registry.register_lazy(
95
'Bazaar development format - btree+gc (needs bzr.dev from 1.6)\n',
96
'bzrlib.plugins.groupcompress.repofmt',
97
'RepositoryFormatPackGCPlain',
99
repo_registry.register_lazy(
100
'Bazaar development format - btree+gc-rich-root (needs bzr.dev from 1.6)\n',
101
'bzrlib.plugins.groupcompress.repofmt',
102
'RepositoryFormatPackGCRichRoot',
104
repo_registry.register_lazy(
105
'Bazaar development format - btree+gc-subtrees (needs bzr.dev from 1.6)\n',
106
'bzrlib.plugins.groupcompress.repofmt',
107
'RepositoryFormatPackGCSubtrees',
109
repo_registry.register_lazy(
110
'Bazaar development format - chk+gc (needs bzr.dev from 1.12)\n',
111
'bzrlib.plugins.groupcompress.repofmt',
112
'RepositoryFormatPackGCPlainCHK',
118
# Thunk across to load_tests for niceness with older bzr versions
119
from bzrlib.tests import TestLoader
120
loader = TestLoader()
121
return loader.loadTestsFromModuleNames(['bzrlib.plugins.groupcompress'])
124
def load_tests(standard_tests, module, loader):
125
standard_tests.addTests(loader.loadTestsFromModuleNames(
126
['bzrlib.plugins.groupcompress.tests']))
127
return standard_tests