/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/lockable_files.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from breezy.lazy_import import lazy_import
 
19
from .lazy_import import lazy_import
20
20
lazy_import(globals(), """
21
21
import warnings
22
22
 
30
30
    )
31
31
""")
32
32
 
33
 
from breezy.decorators import (
 
33
from .decorators import (
34
34
    only_raises,
35
35
    )
36
36
 
119
119
        try:
120
120
            st = self._transport.stat('.')
121
121
        except errors.TransportNotPossible:
122
 
            self._dir_mode = 0755
123
 
            self._file_mode = 0644
 
122
            self._dir_mode = 0o755
 
123
            self._file_mode = 0o644
124
124
        else:
125
125
            # Check the directory mode, but also make sure the created
126
126
            # directories and files are read-write for this user. This is
127
127
            # mostly a workaround for filesystems which lie about being able to
128
128
            # write to a directory (cygwin & win32)
129
 
            self._dir_mode = (st.st_mode & 07777) | 00700
 
129
            self._dir_mode = (st.st_mode & 0o7777) | 0o0700
130
130
            # Remove the sticky and execute bits for files
131
 
            self._file_mode = self._dir_mode & ~07111
 
131
            self._file_mode = self._dir_mode & ~0o7111
132
132
 
133
133
    def leave_in_place(self):
134
134
        """Set this LockableFiles to not clear the physical lock on unlock."""