56
56
When requesting a specific type of export, load the respective path.
58
def _loader(tree, dest, root, subdir, filtered):
58
def _loader(tree, dest, root, subdir, filtered, use_tree_timestamp):
59
59
mod = __import__(module, globals(), locals(), [funcname])
60
60
func = getattr(mod, funcname)
61
return func(tree, dest, root, subdir, filtered=filtered)
61
return func(tree, dest, root, subdir, filtered=filtered,
62
use_tree_timestamp=use_tree_timestamp)
62
63
register_exporter(scheme, extensions, _loader)
65
def export(tree, dest, format=None, root=None, subdir=None, filtered=False):
66
def export(tree, dest, format=None, root=None, subdir=None, filtered=False,
67
use_tree_timestamp=False):
66
68
"""Export the given Tree to the specific destination.
68
70
:param tree: A Tree (such as RevisionTree) to export
81
83
a directory to start exporting from.
82
84
:param filtered: If True, content filtering is applied to the
86
:param use_tree_timestamp: Whether to use the timestamp stored in the
87
tree rather than now().
85
89
global _exporters, _exporter_extensions
99
103
raise errors.NoSuchExportFormat(format)
102
return _exporters[format](tree, dest, root, subdir, filtered=filtered)
106
return _exporters[format](tree, dest, root, subdir, filtered=filtered,
107
use_tree_timestamp=use_tree_timestamp)