Rev 6381: log_format has been migrated but the old config method needs to be deprecated. in file:///home/vila/src/bzr/experimental/config-si-unit/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Dec 16 16:49:57 UTC 2011


At file:///home/vila/src/bzr/experimental/config-si-unit/

------------------------------------------------------------
revno: 6381
revision-id: v.ladeuil+lp at free.fr-20111216164957-2ue76hb7vc4o22e0
parent: v.ladeuil+lp at free.fr-20111216163833-4igwmwi1dmxbbebw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-si-unit
timestamp: Fri 2011-12-16 17:49:57 +0100
message:
  log_format has been migrated but the old config method needs to be deprecated.
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2011-12-16 16:38:33 +0000
+++ b/bzrlib/config.py	2011-12-16 16:49:57 +0000
@@ -491,6 +491,7 @@
         """See gpg_signing_command()."""
         return None
 
+    @deprecated_method(deprecated_in((2, 5, 0)))
     def log_format(self):
         """What log format should be used"""
         result = self._log_format()
@@ -2570,7 +2571,8 @@
 option_registry.register(
     Option('add.maximum_file_size',
            default=u'20MB', from_unicode=int_SI_from_store,
-           help="""Size above which files should be added manually.
+           help="""\
+Size above which files should be added manually.
 
 Files below this size are added automatically when using ``bzr add`` without
 arguments.

=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py	2011-12-16 16:38:33 +0000
+++ b/bzrlib/tests/test_config.py	2011-12-16 16:49:57 +0000
@@ -537,7 +537,9 @@
 
     def test_log_format_default(self):
         my_config = config.Config()
-        self.assertEqual('long', my_config.log_format())
+        self.assertEqual('long',
+                         self.applyDeprecated(deprecated_in((2, 5, 0)),
+                                              my_config.log_format))
 
     def test_acceptable_keys_default(self):
         my_config = config.Config()
@@ -1321,7 +1323,9 @@
 
     def test_configured_logformat(self):
         my_config = self._get_sample_config()
-        self.assertEqual("short", my_config.log_format())
+        self.assertEqual("short",
+                         self.applyDeprecated(deprecated_in((2, 5, 0)),
+                                              my_config.log_format))
 
     def test_configured_acceptable_keys(self):
         my_config = self._get_sample_config()



More information about the bazaar-commits mailing list