Rev 6043: More Branch deprecated code removal in file:///home/vila/src/bzr/cleanup/deprecations/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Mar 14 10:52:43 UTC 2012
At file:///home/vila/src/bzr/cleanup/deprecations/
------------------------------------------------------------
revno: 6043
revision-id: v.ladeuil+lp at free.fr-20120314105242-q4g2bmaiuwc52eej
parent: v.ladeuil+lp at free.fr-20120314101712-8m19vlkis5yr0xtp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: deprecations
timestamp: Wed 2012-03-14 11:52:42 +0100
message:
More Branch deprecated code removal
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2012-03-14 10:17:12 +0000
+++ b/bzrlib/branch.py 2012-03-14 10:52:42 +0000
@@ -1617,22 +1617,6 @@
def __ne__(self, other):
return not (self == other)
- @classmethod
- @deprecated_method(deprecated_in((2, 4, 0)))
- def get_default_format(klass):
- """Return the current default format."""
- return format_registry.get_default()
-
- @classmethod
- @deprecated_method(deprecated_in((2, 4, 0)))
- def get_formats(klass):
- """Get all the known formats.
-
- Warning: This triggers a load of all lazy registered formats: do not
- use except when that is desireed.
- """
- return format_registry._get_all()
-
def get_reference(self, controldir, name=None):
"""Get the target reference of the branch in controldir.
@@ -1726,21 +1710,6 @@
"""
raise NotImplementedError(self.open)
- @classmethod
- @deprecated_method(deprecated_in((2, 4, 0)))
- def register_format(klass, format):
- """Register a metadir format.
-
- See MetaDirBranchFormatFactory for the ability to register a format
- without loading the code the format needs until it is actually used.
- """
- format_registry.register(format)
-
- @classmethod
- @deprecated_method(deprecated_in((2, 4, 0)))
- def set_default_format(klass, format):
- format_registry.set_default(format)
-
def supports_set_append_revisions_only(self):
"""True if this format supports set_append_revisions_only."""
return False
=== modified file 'bzrlib/tests/test_branch.py'
--- a/bzrlib/tests/test_branch.py 2012-03-14 10:17:12 +0000
+++ b/bzrlib/tests/test_branch.py 2012-03-14 10:52:42 +0000
@@ -228,29 +228,6 @@
branch = _mod_branch.Branch.open('.')
self.assertEquals(branch._format.features, {})
- def test_register_unregister_format(self):
- # Test the deprecated format registration functions
- format = SampleBranchFormat()
- # make a control dir
- dir = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
- # make a branch
- format.initialize(dir)
- # register a format for it.
- self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
- _mod_branch.BranchFormat.register_format, format)
- # which branch.Open will refuse (not supported)
- self.assertRaises(errors.UnsupportedFormatError,
- _mod_branch.Branch.open, self.get_url())
- self.make_branch_and_tree('foo')
- # but open_downlevel will work
- self.assertEqual(
- format.open(dir),
- controldir.ControlDir.open(self.get_url()).open_branch(unsupported=True))
- # unregister the format
- self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
- _mod_branch.BranchFormat.unregister_format, format)
- self.make_branch_and_tree('bar')
-
class TestBranchFormatRegistry(tests.TestCase):
=== modified file 'doc/en/release-notes/bzr-2.6.txt'
--- a/doc/en/release-notes/bzr-2.6.txt 2012-03-14 10:17:12 +0000
+++ b/doc/en/release-notes/bzr-2.6.txt 2012-03-14 10:52:42 +0000
@@ -92,6 +92,13 @@
* Remove
``branch.PullResult.__int__`` deprecated in 2.3.0,
``branch.PushResult.__int__`` deprecated in 2.3.0,
+ ``branch.BranchFormat.get_default_format`` deprecated in 2.4.0,
+ ``branch.BranchFormat.get_formats`` deprecated in 2.4.0,
+ ``branch.BranchFormat.set_default_format`` deprecated in 2.4.0,
+ ``branch.BranchFormat.register_format`` deprecated in 2.4.0,
+ ``branch.BranchFormat.unregister_format`` deprecated in 2.4.0,
+ ```` deprecated in 2.4.0,
+ ```` deprecated in 2.4.0,
``bzrdir.BzrDir.generate_backup_name`` deprecated in 2.3.0,
``bzrdir.BzrProber.register_bzrdir_format`` deprecated in 2.4.0,
``bzrdir.BzrProber.unregister_bzrdir_format`` deprecated in 2.4.0,
@@ -104,9 +111,6 @@
``transform.TreeTransformBase.has_named_child`` deprecated in 2.3.0,
``transform.get_backup_name`` deprecated in 2.3.0,
``transform._get_backup_name`` deprecated in 2.3.0,
- ```` deprecated in 2.3.0,
- ```` deprecated in 2.3.0,
- ```` deprecated in 2.3.0,
``workingtree.WorkingTreeFormat.get_default_format`` deprecated in 2.4.0,
``workingtree.WorkingTreeFormat.register_format`` deprecated in 2.4.0,
``workingtree.WorkingTreeFormat.register_extra_format`` deprecated in 2.4.0,
More information about the bazaar-commits
mailing list