Part of bzrlib
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. |
Parameters | format | This is the name of the format, such as 'tgz' or 'zip' |
extensions | Extensions which should be used in the case that a format was not explicitly specified. (type: List) | |
func | The function. It will be called with (tree, dest, root) | |
override | Whether 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. |
When requesting a specific type of export, load the respective path.
The generator is expected to yield None while exporting the tree while the actual export is written to fileobj.
Parameters | tree | A Tree (such as RevisionTree) to export |
dest | The destination where the files, etc should be put | |
format | The format (dir, zip, etc), if None, it will check the extension on dest, looking for a match | |
root | The 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. | |
subdir | A 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. | |
filtered | If True, content filtering is applied to the exported files. Deprecated in favour of passing a ContentFilterTree as the source. | |
per_file_timestamps | Whether 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. | |
fileobj | Optional file object to use |
Parameters | tree | A Tree (such as RevisionTree) to export |
dest | The destination where the files,etc should be put | |
format | The format (dir, zip, etc), if None, it will check the extension on dest, looking for a match | |
root | The 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. | |
subdir | A 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. | |
filtered | If True, content filtering is applied to the files exported. Deprecated in favor of passing an ContentFilterTree. | |
per_file_timestamps | Whether 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. | |
fileobj | Optional file object to use |