[MERGE] set_default deprecations, 2nd Edition

Martin Pool mbp at canonical.com
Tue Jan 9 07:26:31 GMT 2007


I was trying to comment on this and get a repeatable bb crash:

---------------
Seconded, a very useful cleanup.
@@ -1208,9 +1210,15 @@
         klass._control_formats.append(format)
 
     @classmethod
+
@symbol_versioning.deprecated_method(symbol_versioning.zero_fourteen)
     def set_default_format(klass, format):
         klass._default_format = format
 
+    @classmethod
+    def _set_default_format(klass, format):
+        """Set default format (for testing behavior of defaults
only)"""
+        klass._default_format = format
+
     def __str__(self):
         return self.get_format_string()[:-1]

It's trivial here but I would suggest having the deprecated method just
call the new private one.

Perhaps we should go towards the create*() methods being primarily on
the format, not class methods on BzrDir?
-----------


-- 
Martin



More information about the bazaar mailing list