Rev 5547: (spiv) Remove RepositoryFormatCHK1 and RepositoryFormatCHK2. (Andrew in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Nov 22 21:54:25 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5547 [merge]
revision-id: pqm at pqm.ubuntu.com-20101122215424-tfww6o1rayiyq1m7
parent: pqm at pqm.ubuntu.com-20101122013913-s3k719bu7brfu64e
parent: andrew.bennetts at canonical.com-20101122033524-ouxj0onm3gtkimx3
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-11-22 21:54:24 +0000
message:
(spiv) Remove RepositoryFormatCHK1 and RepositoryFormatCHK2. (Andrew
Bennetts)
modified:
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/repofmt/groupcompress_repo.py repofmt.py-20080715094215-wp1qfvoo7093c8qr-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
bzrlib/tests/per_interrepository/__init__.py __init__.py-20060220054744-baf49a1f88f17b1a
bzrlib/tests/per_intertree/__init__.py __init__.py-20060724101752-09ysswo1a92uqyoz-3
bzrlib/tests/per_repository_chk/__init__.py __init__.py-20080925061730-e4g24t5xstp2n2vp-2
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
doc/en/release-notes/bzr-2.3.txt NEWS-20050323055033-4e00b5db738777ff
doc/en/whats-new/whats-new-in-2.3.txt whatsnewin2.3.txt-20100818072501-x2h25r7jbnknvy30-1
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2010-10-15 15:05:09 +0000
+++ b/bzrlib/bzrdir.py 2010-11-22 03:35:24 +0000
@@ -3254,36 +3254,6 @@
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
)
# The following un-numbered 'development' formats should always just be aliases.
-register_metadir(controldir.format_registry, 'development-rich-root',
- 'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK1',
- help='Current development format. Supports rich roots. Can convert data '
- 'to and from rich-root-pack (and anything compatible with '
- 'rich-root-pack) format repositories. Repositories and branches in '
- 'this format can only be read by bzr.dev. Please read '
- 'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
- 'before use.',
- branch_format='bzrlib.branch.BzrBranchFormat7',
- tree_format='bzrlib.workingtree.WorkingTreeFormat6',
- experimental=True,
- alias=True,
- hidden=True,
- )
-register_metadir(controldir.format_registry, 'development5-subtree',
- 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
- help='Development format, subtree variant. Can convert data to and '
- 'from pack-0.92-subtree (and anything compatible with '
- 'pack-0.92-subtree) format repositories. Repositories and branches in '
- 'this format can only be read by bzr.dev. Please read '
- 'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
- 'before use.',
- branch_format='bzrlib.branch.BzrBranchFormat7',
- tree_format='bzrlib.workingtree.WorkingTreeFormat6',
- experimental=True,
- hidden=True,
- alias=False,
- )
-
-
register_metadir(controldir.format_registry, 'development-subtree',
'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2aSubtree',
help='Current development format, subtree variant. Can convert data to and '
@@ -3300,32 +3270,24 @@
# This current non-alias status is simply because we did not introduce a
# chk based subtree format.
)
+register_metadir(controldir.format_registry, 'development5-subtree',
+ 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
+ help='Development format, subtree variant. Can convert data to and '
+ 'from pack-0.92-subtree (and anything compatible with '
+ 'pack-0.92-subtree) format repositories. Repositories and branches in '
+ 'this format can only be read by bzr.dev. Please read '
+ 'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
+ 'before use.',
+ branch_format='bzrlib.branch.BzrBranchFormat7',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat6',
+ experimental=True,
+ hidden=True,
+ alias=False,
+ )
# And the development formats above will have aliased one of the following:
-register_metadir(controldir.format_registry, 'development6-rich-root',
- 'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK1',
- help='pack-1.9 with 255-way hashed CHK inv, group compress, rich roots '
- 'Please read '
- 'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
- 'before use.',
- branch_format='bzrlib.branch.BzrBranchFormat7',
- tree_format='bzrlib.workingtree.WorkingTreeFormat6',
- hidden=True,
- experimental=True,
- )
-
-register_metadir(controldir.format_registry, 'development7-rich-root',
- 'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK2',
- help='pack-1.9 with 255-way hashed CHK inv, bencode revision, group compress, '
- 'rich roots. Please read '
- 'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
- 'before use.',
- branch_format='bzrlib.branch.BzrBranchFormat7',
- tree_format='bzrlib.workingtree.WorkingTreeFormat6',
- hidden=True,
- experimental=True,
- )
-
+
+# Finally, the current format.
register_metadir(controldir.format_registry, '2a',
'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
help='First format for bzr 2.0 series.\n'
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py 2010-09-01 11:27:40 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py 2010-11-22 03:35:24 +0000
@@ -1339,19 +1339,15 @@
yield record
-
-
-class RepositoryFormatCHK1(RepositoryFormatPack):
- """A hashed CHK+group compress pack repository."""
+class RepositoryFormat2a(RepositoryFormatPack):
+ """A CHK repository that uses the bencode revision serializer."""
repository_class = CHKInventoryRepository
supports_external_lookups = True
supports_chks = True
- # For right now, setting this to True gives us InterModel1And2 rather
- # than InterDifferingSerializer
_commit_builder_class = PackRootCommitBuilder
rich_root_data = True
- _serializer = chk_serializer.chk_serializer_255_bigpage
+ _serializer = chk_serializer.chk_bencode_serializer
_commit_inv_deltas = True
# What index classes to use
index_builder_class = BTreeBuilder
@@ -1368,52 +1364,6 @@
pack_compresses = True
def _get_matching_bzrdir(self):
- return bzrdir.format_registry.make_bzrdir('development6-rich-root')
-
- def _ignore_setting_bzrdir(self, format):
- pass
-
- _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
-
- def get_format_string(self):
- """See RepositoryFormat.get_format_string()."""
- return ('Bazaar development format - group compression and chk inventory'
- ' (needs bzr.dev from 1.14)\n')
-
- def get_format_description(self):
- """See RepositoryFormat.get_format_description()."""
- return ("Development repository format - rich roots, group compression"
- " and chk inventories")
-
-
-class RepositoryFormatCHK2(RepositoryFormatCHK1):
- """A CHK repository that uses the bencode revision serializer."""
-
- _serializer = chk_serializer.chk_bencode_serializer
-
- def _get_matching_bzrdir(self):
- return bzrdir.format_registry.make_bzrdir('development7-rich-root')
-
- def _ignore_setting_bzrdir(self, format):
- pass
-
- _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
-
- def get_format_string(self):
- """See RepositoryFormat.get_format_string()."""
- return ('Bazaar development format - chk repository with bencode '
- 'revision serialization (needs bzr.dev from 1.16)\n')
-
-
-class RepositoryFormat2a(RepositoryFormatCHK2):
- """A CHK repository that uses the bencode revision serializer.
-
- This is the same as RepositoryFormatCHK2 but with a public name.
- """
-
- _serializer = chk_serializer.chk_bencode_serializer
-
- def _get_matching_bzrdir(self):
return bzrdir.format_registry.make_bzrdir('2a')
def _ignore_setting_bzrdir(self, format):
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2010-09-28 18:51:47 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2010-11-22 03:35:24 +0000
@@ -2894,12 +2894,10 @@
class RepositoryFormatPackDevelopment2Subtree(RepositoryFormatPack):
"""A subtrees development repository.
- This format should be retained until the second release after bzr 1.7.
+ This format should be retained in 2.3, to provide an upgrade path from this
+ to RepositoryFormat2aSubtree. It can be removed in later releases.
1.6.1-subtree[as it might have been] with B+Tree indices.
-
- This is [now] retained until we have a CHK based subtree format in
- development.
"""
repository_class = KnitPackRepository
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2010-10-19 19:10:35 +0000
+++ b/bzrlib/repository.py 2010-11-22 03:35:24 +0000
@@ -3352,35 +3352,20 @@
'bzrlib.repofmt.pack_repo',
'RepositoryFormatKnitPack6RichRoot',
)
+format_registry.register_lazy(
+ 'Bazaar repository format 2a (needs bzr 1.16 or later)\n',
+ 'bzrlib.repofmt.groupcompress_repo',
+ 'RepositoryFormat2a',
+ )
# Development formats.
-# Obsolete but kept pending a CHK based subtree format.
+# Check their docstrings to see if/when they are obsolete.
format_registry.register_lazy(
("Bazaar development format 2 with subtree support "
"(needs bzr.dev from before 1.8)\n"),
'bzrlib.repofmt.pack_repo',
'RepositoryFormatPackDevelopment2Subtree',
)
-
-# 1.14->1.16 go below here
-format_registry.register_lazy(
- 'Bazaar development format - group compression and chk inventory'
- ' (needs bzr.dev from 1.14)\n',
- 'bzrlib.repofmt.groupcompress_repo',
- 'RepositoryFormatCHK1',
- )
-
-format_registry.register_lazy(
- 'Bazaar development format - chk repository with bencode revision '
- 'serialization (needs bzr.dev from 1.16)\n',
- 'bzrlib.repofmt.groupcompress_repo',
- 'RepositoryFormatCHK2',
- )
-format_registry.register_lazy(
- 'Bazaar repository format 2a (needs bzr 1.16 or later)\n',
- 'bzrlib.repofmt.groupcompress_repo',
- 'RepositoryFormat2a',
- )
format_registry.register_lazy(
'Bazaar development format 8\n',
'bzrlib.repofmt.groupcompress_repo',
=== modified file 'bzrlib/tests/blackbox/test_add.py'
--- a/bzrlib/tests/blackbox/test_add.py 2010-07-16 13:53:26 +0000
+++ b/bzrlib/tests/blackbox/test_add.py 2010-11-22 03:35:24 +0000
@@ -34,7 +34,7 @@
standard_tests, tests.condition_isinstance(TestAdd))
scenarios = [
('pre-views', {'branch_tree_format': 'pack-0.92'}),
- ('view-aware', {'branch_tree_format': 'development6-rich-root'}),
+ ('view-aware', {'branch_tree_format': '2a'}),
]
return tests.multiply_tests(to_adapt, scenarios, result)
=== modified file 'bzrlib/tests/blackbox/test_filtered_view_ops.py'
--- a/bzrlib/tests/blackbox/test_filtered_view_ops.py 2010-02-17 17:11:16 +0000
+++ b/bzrlib/tests/blackbox/test_filtered_view_ops.py 2010-11-22 03:35:24 +0000
@@ -28,10 +28,7 @@
class TestViewFileOperations(tests.TestCaseWithTransport):
def make_abc_tree_with_ab_view(self):
- # we need to use a specific format because the default format
- # doesn't support views yet
- format = bzrdir.format_registry.make_bzrdir('development6-rich-root')
- wt = self.make_branch_and_tree( '.', format=format)
+ wt = self.make_branch_and_tree('.')
self.build_tree(['a', 'b', 'c'])
wt.views.set_view('my', ['a', 'b'])
return wt
@@ -156,11 +153,8 @@
class TestViewTreeOperations(tests.TestCaseWithTransport):
def make_abc_tree_and_clone_with_ab_view(self):
- # we need to use a specific format because the default format
- # doesn't support views yet
- format = bzrdir.format_registry.make_bzrdir('development6-rich-root')
# Build the first tree
- wt1 = self.make_branch_and_tree('tree_1', format=format)
+ wt1 = self.make_branch_and_tree('tree_1')
self.build_tree(['tree_1/a', 'tree_1/b', 'tree_1/c'])
wt1.add(['a', 'b', 'c'])
wt1.commit("adding a b c")
=== modified file 'bzrlib/tests/blackbox/test_view.py'
--- a/bzrlib/tests/blackbox/test_view.py 2009-04-08 03:34:31 +0000
+++ b/bzrlib/tests/blackbox/test_view.py 2010-11-22 03:35:24 +0000
@@ -23,19 +23,12 @@
class TestViewUI(TestCaseWithTransport):
- def make_branch_and_tree(self):
- # we need to use a specific format because the default format
- # doesn't support views yet
- format = bzrdir.format_registry.make_bzrdir('development6-rich-root')
- return TestCaseWithTransport.make_branch_and_tree(self, '.',
- format=format)
-
def test_view_command_help(self):
out, err = self.run_bzr('help view')
self.assertContainsRe(out, 'Manage filtered views')
def test_define_view(self):
- wt = self.make_branch_and_tree()
+ wt = self.make_branch_and_tree('.')
# Check definition of a new view
out, err = self.run_bzr('view a b c')
self.assertEquals(out, "Using 'my' view: a, b, c\n")
@@ -51,7 +44,7 @@
self.assertContainsRe(err, "Cannot change the 'off' pseudo view")
def test_list_view(self):
- wt = self.make_branch_and_tree()
+ wt = self.make_branch_and_tree('.')
# Check list of the current view
out, err = self.run_bzr('view')
self.assertEquals(out, "No current view.\n")
@@ -76,7 +69,7 @@
self.assertContainsRe(err, "No such view")
def test_delete_view(self):
- wt = self.make_branch_and_tree()
+ wt = self.make_branch_and_tree('.')
# Check delete of the current view
out, err = self.run_bzr('view --delete', retcode=3)
self.assertContainsRe(err, "No current view to delete")
@@ -101,7 +94,7 @@
self.assertContainsRe(err, "Both --delete and a file list specified")
def test_switch_view(self):
- wt = self.make_branch_and_tree()
+ wt = self.make_branch_and_tree('.')
# Check switching to a named view
self.run_bzr('view a b c')
self.run_bzr('view e f --name foo')
=== modified file 'bzrlib/tests/per_interrepository/__init__.py'
--- a/bzrlib/tests/per_interrepository/__init__.py 2010-09-17 04:35:23 +0000
+++ b/bzrlib/tests/per_interrepository/__init__.py 2010-11-22 03:35:24 +0000
@@ -128,12 +128,6 @@
add_combo('InterDifferingSerializer',
groupcompress_repo.RepositoryFormat2a(),
pack_repo.RepositoryFormatKnitPack6RichRoot())
- add_combo('InterRepository',
- groupcompress_repo.RepositoryFormatCHK2(),
- groupcompress_repo.RepositoryFormat2a())
- add_combo('InterDifferingSerializer',
- groupcompress_repo.RepositoryFormatCHK1(),
- groupcompress_repo.RepositoryFormat2a())
return result
=== modified file 'bzrlib/tests/per_intertree/__init__.py'
--- a/bzrlib/tests/per_intertree/__init__.py 2010-06-20 11:18:38 +0000
+++ b/bzrlib/tests/per_intertree/__init__.py 2010-11-22 03:35:24 +0000
@@ -137,8 +137,7 @@
# -- vila 20090311
chk_tree_format = WorkingTreeFormat4()
chk_tree_format._get_matchingbzrdir = \
- lambda:bzrlib.bzrdir.format_registry.make_bzrdir(
- 'development6-rich-root')
+ lambda:bzrlib.bzrdir.format_registry.make_bzrdir('2a')
test_intertree_permutations.append(
(InterTree.__name__ + "(CHKInventory)",
InterTree,
=== modified file 'bzrlib/tests/per_repository_chk/__init__.py'
--- a/bzrlib/tests/per_repository_chk/__init__.py 2010-03-31 16:29:25 +0000
+++ b/bzrlib/tests/per_repository_chk/__init__.py 2010-11-22 03:35:24 +0000
@@ -31,7 +31,7 @@
RepositoryFormatKnitPack5,
)
from bzrlib.repofmt.groupcompress_repo import (
- RepositoryFormatCHK1,
+ RepositoryFormat2a,
)
from bzrlib.tests import (
multiply_tests,
@@ -61,7 +61,7 @@
# with the chosen backing format.
if isinstance(format, remote.RemoteRepositoryFormat):
with_support = dict(scenario_info)
- with_support['repository_format'] = RepositoryFormatCHK1()
+ with_support['repository_format'] = RepositoryFormat2a()
supported_scenarios.append((test_name + "(Supported)", with_support))
no_support = dict(scenario_info)
no_support['repository_format'] = RepositoryFormatKnitPack5()
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2010-08-02 18:36:31 +0000
+++ b/bzrlib/tests/test_remote.py 2010-11-22 03:35:24 +0000
@@ -1867,7 +1867,7 @@
class TestRepositoryFormat(TestRemoteRepository):
def test_fast_delta(self):
- true_name = groupcompress_repo.RepositoryFormatCHK1().network_name()
+ true_name = groupcompress_repo.RepositoryFormat2a().network_name()
true_format = RemoteRepositoryFormat()
true_format._network_name = true_name
self.assertEqual(True, true_format.fast_deltas)
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2010-08-05 19:25:52 +0000
+++ b/bzrlib/tests/test_repository.py 2010-11-22 03:35:24 +0000
@@ -972,8 +972,7 @@
def setUp(self):
super(TestDevelopment6FindParentIdsOfRevisions, self).setUp()
- self.builder = self.make_branch_builder('source',
- format='development6-rich-root')
+ self.builder = self.make_branch_builder('source')
self.builder.start_series()
self.builder.build_snapshot('initial', None,
[('add', ('', 'tree-root', 'directory', None))])
=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- a/doc/en/release-notes/bzr-2.3.txt 2010-11-22 01:39:13 +0000
+++ b/doc/en/release-notes/bzr-2.3.txt 2010-11-22 03:35:24 +0000
@@ -87,6 +87,11 @@
* ``BranchBuilder.build_snapshot`` now accepts parent_ids == [].
This can be used to create a new root in the graph. (Gary van der Merwe)
+* Old repository development formats
+ RepositoryFormatCHK1 and RepositoryFormatCHK2 have been removed, and so
+ have the corresponding metadir format options ``development-rich-root``,
+ ``development6-rich-root``, and ``development7-rich-root``.
+
Testing
*******
=== modified file 'doc/en/whats-new/whats-new-in-2.3.txt'
--- a/doc/en/whats-new/whats-new-in-2.3.txt 2010-11-07 16:09:43 +0000
+++ b/doc/en/whats-new/whats-new-in-2.3.txt 2010-11-22 03:35:24 +0000
@@ -20,6 +20,13 @@
Changed Behaviour
*****************
+* Support for some old development formats have been removed:
+ ``development-rich-root``, ``development6-rich-root``, and
+ ``development7-rich-root``. These formats were always labelled experimental
+ and not used unless the user specifically asked for them. If you have
+ repositories using these old formats you should upgrade them to ``2a`` using
+ Bazaar 2.2. (Andrew Bennetts)
+
* The default ``ignore`` file created by Bazaar will contain ``__pycache__``,
which is the name of the directory that will be used by Python to store
bytecode files.
More information about the bazaar-commits
mailing list