/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/export/zip_exporter.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import time
26
26
import zipfile
27
27
 
28
 
from bzrlib import (
 
28
from .. import (
29
29
    osutils,
30
30
    )
31
 
from bzrlib.export import _export_iter_entries
32
 
from bzrlib.trace import mutter
 
31
from ..export import _export_iter_entries
 
32
from ..trace import mutter
33
33
 
34
34
 
35
35
# Windows expects this bit to be set in the 'external_attr' section,
36
36
# or it won't consider the entry a directory.
37
37
ZIP_DIRECTORY_BIT = (1 << 4)
38
 
FILE_PERMISSIONS = (0644 << 16)
39
 
DIR_PERMISSIONS = (0755 << 16)
 
38
FILE_PERMISSIONS = (0o644 << 16)
 
39
DIR_PERMISSIONS = (0o755 << 16)
40
40
 
41
41
_FILE_ATTR = stat.S_IFREG | FILE_PERMISSIONS
42
42
_DIR_ATTR = stat.S_IFDIR | ZIP_DIRECTORY_BIT | DIR_PERMISSIONS
101
101
    except UnicodeEncodeError:
102
102
        zipf.close()
103
103
        os.remove(dest)
104
 
        from bzrlib.errors import BzrError
 
104
        from breezy.errors import BzrError
105
105
        raise BzrError("Can't export non-ascii filenames to zip")