~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/tar_exporter.py

Implemented fileobj on tgz_exporter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
 
108
108
    
109
109
 
110
 
def tgz_exporter(tree, dest, root, subdir, filtered=False, force_mtime=None):
 
110
def tgz_exporter(tree, dest, root, subdir, filtered=False, force_mtime=None,
 
111
                 per_file_timestamps=False, fileobj=None):
111
112
    """Export this tree to a new tar file.
112
113
 
113
114
    `dest` will be created holding the contents of this tree; if it
127
128
        root_mtime = None
128
129
 
129
130
    is_stdout = False
130
 
    if dest == '-':
 
131
    if fileobj is not None:
 
132
        stream = fileobj
 
133
    elif dest == '-':
131
134
        basename = None
132
135
        stream = sys.stdout
133
136
        is_stdout = True