/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/archive/tar.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        zipstream = gzip.GzipFile(basename, 'w', fileobj=buf,
139
139
                                  mtime=root_mtime)
140
140
        for chunk in tarball_generator(
141
 
            tree, root, subdir, force_mtime):
 
141
                tree, root, subdir, force_mtime):
142
142
            zipstream.write(chunk)
143
143
            # Yield the data that was written so far, rinse, repeat.
144
144
            yield buf.getvalue()
160
160
 
161
161
 
162
162
def plain_tar_generator(tree, dest, root, subdir,
163
 
    force_mtime=None):
 
163
                        force_mtime=None):
164
164
    """Export this tree to a new tar file.
165
165
 
166
166
    `dest` will be created holding the contents of this tree; if it
188
188
 
189
189
    if sys.version_info[0] == 2:
190
190
        compressor = lzma.LZMACompressor(
191
 
                options={"format": compression_format})
 
191
            options={"format": compression_format})
192
192
    else:
193
193
        compressor = lzma.LZMACompressor(
194
 
                format={
195
 
                    'xz': lzma.FORMAT_XZ,
196
 
                    'raw': lzma.FORMAT_RAW,
197
 
                    'alone': lzma.FORMAT_ALONE,
 
194
            format={
 
195
                'xz': lzma.FORMAT_XZ,
 
196
                'raw': lzma.FORMAT_RAW,
 
197
                'alone': lzma.FORMAT_ALONE,
198
198
                }[compression_format])
199
199
 
200
200
    for chunk in tarball_generator(