b.export : package documentation

Part of bzrlib

Export trees to tarballs, non-controlled directories, zipfiles, etc.
Module dir_exporter Export a bzrlib.tree.Tree to a new or empty directory.
Module tar_exporter Export a tree to a tarball.
Module zip_exporter Export a Tree to a zip file.

From the __init__.py module:

Function export Export the given Tree to the specific destination.
Function get_export_generator Returns a generator that exports the given tree.
Function get_root_name Get just the root name for an export.
Function register_exporter Register an exporter.
Function register_lazy_exporter Register lazy-loaded exporter function.
Function _export_iter_entries Iter the entries for tree suitable for exporting.
def register_exporter(format, extensions, func, override=False):
Register an exporter.
ParametersformatThis is the name of the format, such as 'tgz' or 'zip'
extensionsExtensions which should be used in the case that a format was not explicitly specified. (type: List)
funcThe function. It will be called with (tree, dest, root)
overrideWhether to override an object which already exists. Frequently plugins will want to provide functionality until it shows up in mainline, so the default is False.
def register_lazy_exporter(scheme, extensions, module, funcname):
Register lazy-loaded exporter function.

When requesting a specific type of export, load the respective path.

def get_export_generator(tree, dest=None, format=None, root=None, subdir=None, filtered=False, per_file_timestamps=False, fileobj=None):
Returns a generator that exports the given tree.

The generator is expected to yield None while exporting the tree while the actual export is written to fileobj.

ParameterstreeA Tree (such as RevisionTree) to export
destThe destination where the files, etc should be put
formatThe format (dir, zip, etc), if None, it will check the extension on dest, looking for a match
rootThe root location inside the format. It is common practise to have zipfiles and tarballs extract into a subdirectory, rather than into the current working directory. If root is None, the default root will be selected as the destination without its extension.
subdirA starting directory within the tree. None means to export the entire tree, and anything else should specify the relative path to a directory to start exporting from.
filteredIf True, content filtering is applied to the exported files. Deprecated in favour of passing a ContentFilterTree as the source.
per_file_timestampsWhether to use the timestamp stored in the tree rather than now(). This will do a revision lookup for every file so will be significantly slower.
fileobjOptional file object to use
def export(tree, dest, format=None, root=None, subdir=None, filtered=False, per_file_timestamps=False, fileobj=None):
Export the given Tree to the specific destination.
ParameterstreeA Tree (such as RevisionTree) to export
destThe destination where the files,etc should be put
formatThe format (dir, zip, etc), if None, it will check the extension on dest, looking for a match
rootThe root location inside the format. It is common practise to have zipfiles and tarballs extract into a subdirectory, rather than into the current working directory. If root is None, the default root will be selected as the destination without its extension.
subdirA starting directory within the tree. None means to export the entire tree, and anything else should specify the relative path to a directory to start exporting from.
filteredIf True, content filtering is applied to the files exported. Deprecated in favor of passing an ContentFilterTree.
per_file_timestampsWhether to use the timestamp stored in the tree rather than now(). This will do a revision lookup for every file so will be significantly slower.
fileobjOptional file object to use
def get_root_name(dest):
Get just the root name for an export.
def _export_iter_entries(tree, subdir, skip_special=True):
Iter the entries for tree suitable for exporting.
ParameterstreeA tree object.
subdirNone or the path of an entry to start exporting from.
skip_specialWhether to skip .bzr files.
API Documentation for Bazaar, generated by pydoctor at 2014-09-03 00:02:40.