Part of bzrlib.branch View In Hierarchy
Known subclasses: bzrlib.branch.BranchFormatMetadir, bzrlib.plugins.weave_fmt.branch.BzrBranchFormat4, bzrlib.remote.RemoteBranchFormat, bzrlib.tests.per_bzrdir.test_bzrdir.AnonymousTestBranchFormat, bzrlib.tests.per_bzrdir.test_bzrdir.IdentifiableTestBranchFormat, bzrlib.tests.test_branch.SampleBranchFormat, bzrlib.tests.test_branch.SampleExtraBranchFormat, bzrlib.tests.test_branch.SampleSupportedBranchFormat, bzrlib.tests.test_bzrdir._TestBranchFormat
Formats are placed in an dict by their format string for reference during branch opening. It's not required that these be instances, they can be classes themselves with class methods - it simply depends on whether state is needed for a given format or not.
Once a format is deprecated, just deprecate the initialize and open methods on the format class. Do not deprecate the object, as the object will be created every time regardless.
Method | __eq__ | Undocumented |
Method | __ne__ | Undocumented |
Class Method | find_format | Return the format for the branch object in controldir. |
Class Method | get_default_format | Return the current default format. |
Class Method | get_formats | Get all the known formats. |
Method | get_reference | Get the target reference of the branch in controldir. |
Class Method | set_reference | Set the target reference of the branch in controldir. |
Method | get_format_string | Return the ASCII format string that identifies this format. |
Method | get_format_description | Return the short format description for this format. |
Method | initialize | Create a branch of this format in controldir. |
Method | is_supported | Is this format supported? |
Method | make_tags | Create a tags object for branch. |
Method | network_name | A simple byte string uniquely identifying this format for RPC calls. |
Method | open | Return the branch object for controldir. |
Class Method | register_format | Register a metadir format. |
Class Method | set_default_format | Undocumented |
Method | supports_set_append_revisions_only | True if this format supports set_append_revisions_only. |
Method | supports_stacking | True if this format records a stacked-on branch. |
Method | supports_leaving_lock | True if this format supports leaving locks in place. |
Class Method | unregister_format | Undocumented |
Method | __str__ | Undocumented |
Method | supports_tags | True if this format supports tags stored in the branch |
Method | tags_are_versioned | Whether the tag container for this branch versions tags. |
Method | supports_tags_referencing_ghosts | True if tags can reference ghost revisions. |
Method | _run_post_branch_init_hooks | Undocumented |
Inherited from ControlComponentFormat:
Method | check_support_status | Give an error or warning on old formats. |
Warning: This triggers a load of all lazy registered formats: do not use except when that is desireed.
format probing must have been completed before calling this method - it is assumed that the format of the branch in controldir is correct.
Parameters | controldir | The controldir to get the branch data from. |
name | Name of the colocated branch to fetch | |
Returns | None if the branch is not a reference branch. |
format probing must have been completed before calling this method - it is assumed that the format of the branch in controldir is correct.
Parameters | controldir | The controldir to set the branch reference for. |
name | Name of colocated branch to set, None for default | |
to_branch | branch that the checkout is to reference |
Parameters | name | Name of the colocated branch to create. |
Supported formats can be initialized and opened. Unsupported formats may not support initialization or committing or some other features depending on the reason for not being supported.
This method is on BranchFormat, because BranchFormats are reflected over the wire via network_name(), whereas full Branch instances require multiple VFS method calls to operate at all.
The default implementation returns a disabled-tags instance.
Note that it is normal for branch to be a RemoteBranch when using tags on a RemoteBranch.
MetaDir branch formats use their disk format string to identify the repository over the wire. All in one formats such as bzr < 0.8, and foreign formats like svn/git and hg should use some marker which is unique and immutable.
Parameters | controldir | A ControlDir that contains a branch. |
name | Name of colocated branch to open | |
_found | a private parameter, do not use it. It is used to indicate if format probing has already be done. | |
ignore_fallbacks | when set, no fallback branches will be opened (if there are any). Default is to open fallbacks. |
See MetaDirBranchFormatFactory for the ability to register a format without loading the code the format needs until it is actually used.