/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/lockable_files.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:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from bzrlib.lazy_import import lazy_import
 
19
from .lazy_import import lazy_import
20
20
lazy_import(globals(), """
21
21
import warnings
22
22
 
23
 
from bzrlib import (
 
23
from breezy import (
24
24
    counted_lock,
25
25
    errors,
26
26
    lock,
30
30
    )
31
31
""")
32
32
 
33
 
from bzrlib.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."""