b.w.WorkingTreeFormat(controldir.ControlComponentFormat) : class documentation

Part of bzrlib.workingtree View In Hierarchy

Known subclasses: bzrlib.plugins.weave_fmt.workingtree.WorkingTreeFormat2, bzrlib.tests.per_bzrdir.test_bzrdir.AnonymousTestWorkingTreeFormat, bzrlib.tests.per_bzrdir.test_bzrdir.IdentifiableTestWorkingTreeFormat, bzrlib.tests.test_workingtree.SampleExtraTreeFormat, bzrlib.tests.test_workingtree.SampleTreeFormat, bzrlib.workingtree_3.WorkingTreeFormat3, bzrlib.workingtree_4.DirStateWorkingTreeFormat

An encapsulation of the initialization and open routines for a format.

Formats provide three things:
  • An initialization routine,
  • a format string,
  • an open routine.

Formats are placed in an dict by their format string for reference during workingtree opening. Its 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.

Class Method find_format_string Return format name for the working tree object in controldir.
Class Method find_format Return the format for the working tree object in controldir.
Method initialize Initialize a new working tree in controldir.
Method __eq__ Undocumented
Method __ne__ Undocumented
Class Method get_default_format Return the current default format.
Method get_format_string Return the ASCII format string that identifies this format.
Method get_format_description Return the short description for this format.
Method is_supported Is this format supported?
Method supports_content_filtering True if this format supports content filtering.
Method supports_views True if this format supports stored views.
Class Method register_format Undocumented
Class Method register_extra_format Undocumented
Class Method unregister_extra_format Undocumented
Class Method get_formats Undocumented
Class Method set_default_format Undocumented
Class Method unregister_format Undocumented
Method get_controldir_for_branch Get the control directory format for creating branches.
@classmethod
def find_format_string(klass, controldir):
Return format name for the working tree object in controldir.
@classmethod
def find_format(klass, controldir):
Return the format for the working tree object in controldir.
def initialize(self, controldir, revision_id=None, from_branch=None, accelerator_tree=None, hardlink=False):
Initialize a new working tree in controldir.
ParameterscontroldirControlDir to initialize the working tree in.
revision_idallows creating a working tree at a different revision than the branch is at.
from_branchBranch to checkout
accelerator_treeA tree which can be used for retrieving file contents more quickly than the revision tree, i.e. a workingtree. The revision tree will be used for cases where accelerator_tree's content is different.
hardlinkIf true, hard-link files from accelerator_tree, where possible.
def __eq__(self, other):
Undocumented
def __ne__(self, other):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def get_default_format(klass):
Return the current default format.
def get_format_string(self):
Return the ASCII format string that identifies this format.
def get_format_description(self):
Return the short description for this format.
def is_supported(self):
Is this format supported?

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.

def supports_content_filtering(self):
True if this format supports content filtering.
def supports_views(self):
True if this format supports stored views.
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def register_format(klass, format):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def register_extra_format(klass, format):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def unregister_extra_format(klass, format):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def get_formats(klass):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def set_default_format(klass, format):
Undocumented
@classmethod
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def unregister_format(klass, format):
Undocumented
def get_controldir_for_branch(self):
Get the control directory format for creating branches.

This is to support testing of working tree formats that can not exist in the same control directory as a branch.

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.