b.c.ControlDirFormatRegistry(registry.Registry) : class documentation

Part of bzrlib.controldir View In Hierarchy

Registry of user-selectable ControlDir subformats.

Differs from ControlDirFormat._formats in that it provides sub-formats, e.g. BzrDirMeta1 with weave repository. Also, it's more user-oriented.

Method __init__ Create a ControlDirFormatRegistry.
Method aliases Return a set of the format names which are aliases.
Method register Register a ControlDirFormat factory.
Method register_lazy Register a new object to be loaded on request.
Method set_default Set the 'default' key to be a clone of the supplied key.
Method set_default_repository Set the FormatRegistry default and Repository default.
Method make_bzrdir Undocumented
Method help_topic Undocumented

Inherited from Registry:

Method get Return the object register()'ed to the given key.
Method get_prefix Return an object whose key is a prefix of the supplied value.
Method get_help Get the help text associated with the given key
Method get_info Get the extra information associated with the given key
Method remove Remove a registered entry.
Method __contains__ Undocumented
Method keys Get a list of registered entries
Method iteritems Undocumented
Method items Undocumented
Method _add_help_and_info Add the help and information about this key
Method _get_module Return the module the object will be or was loaded from.
Method _get_key_or_default Return either 'key' or the default key if key is None
Method _set_default_key Undocumented
Method _get_default_key Undocumented
def __init__(self):
Create a ControlDirFormatRegistry.
def aliases(self):
Return a set of the format names which are aliases.
def register(self, key, factory, help, native=True, deprecated=False, hidden=False, experimental=False, alias=False):
Register a ControlDirFormat factory.

The factory must be a callable that takes one parameter: the key. It must produce an instance of the ControlDirFormat when called.

This function mainly exists to prevent the info object from being supplied directly.

def register_lazy(self, key, module_name, member_name, help, native=True, deprecated=False, hidden=False, experimental=False, alias=False):
Register a new object to be loaded on request.
ParameterskeyThis is the key to use to request the object later.
module_nameThe python path to the module. Such as 'os.path'.
member_nameThe member of the module to return. If empty or None, get() will return the module itself.
helpHelp text for this entry. This may be a string or a callable.
infoMore information for this entry. Registry.get_info() can be used to get this information. Registry treats this as an opaque storage location (it is defined by the caller).
override_existingIf True, replace the existing object with the new one. If False, if there is already something registered with the same key, raise a KeyError
def set_default(self, key):
Set the 'default' key to be a clone of the supplied key.

This method must be called once and only once.

def set_default_repository(self, key):
Set the FormatRegistry default and Repository default.

This is a transitional method while Repository.set_default_format is deprecated.

def make_bzrdir(self, key):
Undocumented
def help_topic(self, topic):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-07-22 00:30:44.