b.b.BzrDirFormatRegistry(registry.Registry) : class documentation

Part of bzrlib.bzrdir View In Hierarchy

Registry of user-selectable BzrDir subformats.

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

Method __init__ Create a BzrDirFormatRegistry.
Method aliases Return a set of the format names which are aliases.
Method register_metadir Register a metadir subformat.
Method register Register a BzrDirFormat 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_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 BzrDirFormatRegistry.
def aliases(self):
Return a set of the format names which are aliases.
def register_metadir(self, key, repository_format, help, native=True, deprecated=False, branch_format=None, tree_format=None, hidden=False, experimental=False, alias=False):
Register a metadir subformat.

These all use a BzrDirMetaFormat1 bzrdir, but can be parameterized by the Repository/Branch/WorkingTreeformats.

Parametersrepository_formatThe fully-qualified repository format class name as a string.
branch_formatFully-qualified branch format class name as a string.
tree_formatFully-qualified tree format class name as a string.
def register(self, key, factory, help, native=True, deprecated=False, hidden=False, experimental=False, alias=False):
Register a BzrDirFormat factory.

The factory must be a callable that takes one parameter: the key. It must produce an instance of the BzrDirFormat 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.
Parametersmodule_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
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 2010-08-24 00:12:43.