/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: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Export a tree to a tarball."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
from contextlib import closing
 
20
from io import BytesIO
22
21
import os
23
22
import sys
24
23
import tarfile
28
27
    osutils,
29
28
    )
30
29
from ..export import _export_iter_entries
31
 
from ..sixish import (
32
 
    BytesIO,
33
 
    )
34
30
 
35
31
 
36
32
def prepare_tarball_item(tree, root, final_path, tree_path, entry, force_mtime=None):
185
181
    except ImportError as e:
186
182
        raise errors.DependencyNotPresent('lzma', e)
187
183
 
188
 
    if sys.version_info[0] == 2:
189
 
        compressor = lzma.LZMACompressor(
190
 
            options={"format": compression_format})
191
 
    else:
192
 
        compressor = lzma.LZMACompressor(
193
 
            format={
194
 
                'xz': lzma.FORMAT_XZ,
195
 
                'raw': lzma.FORMAT_RAW,
196
 
                'alone': lzma.FORMAT_ALONE,
197
 
                }[compression_format])
 
184
    compressor = lzma.LZMACompressor(
 
185
        format={
 
186
            'xz': lzma.FORMAT_XZ,
 
187
            'raw': lzma.FORMAT_RAW,
 
188
            'alone': lzma.FORMAT_ALONE,
 
189
            }[compression_format])
198
190
 
199
191
    for chunk in tarball_generator(
200
192
            tree, root, subdir, force_mtime=force_mtime):