~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/dir_exporter.py

Major code cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    )
28
28
 
29
29
 
30
 
def dir_exporter(tree, dest, root, subdir=None, filtered=False, force_mtime=None, fileobj=None):
31
 
    """Export this tree to a new directory.
 
30
def dir_exporter(tree, dest, root, subdir=None, filtered=False, force_mtime=None, per_file_timestamps=False, fileobj=None):
 
31
    """Return a generator that exports this tree to a new directory.
32
32
 
33
33
    `dest` should either not exist or should be empty. If it does not exist it
34
34
    will be created holding the contents of this tree.
71
71
        else:
72
72
            raise errors.BzrError("don't know how to export {%s} of kind %r" %
73
73
               (ie.file_id, ie.kind))
 
74
 
74
75
        yield
75
76
    # The data returned here can be in any order, but we've already created all
76
77
    # the directories
95
96
        else:
96
97
            mtime = tree.get_file_mtime(tree.path2id(relpath), relpath)
97
98
        os.utime(fullpath, (mtime, mtime))
 
99
 
98
100
        yield