~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_permissions.py

1st cut merge of bzr.dev r3907

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
# TODO: jam 20051215 Currently the default behavior for 'bzr branch' is just 
30
30
#                    defined by the local umask. This isn't terrible, is it
31
31
#                    the truly desired behavior?
32
 
 
 
32
 
33
33
import os
34
34
import sys
35
35
import stat
38
38
 
39
39
from bzrlib.branch import Branch
40
40
from bzrlib.bzrdir import BzrDir
41
 
from bzrlib.lockable_files import LockableFiles, TransportLock
42
41
from bzrlib.tests import TestCaseWithTransport, TestSkipped
43
42
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
44
43
from bzrlib.transport import get_transport
138
137
        t.commit('new c')
139
138
        check_mode_r(self, '.bzr', 0664, 0775)
140
139
 
 
140
    def test_new_files_group_sticky_bit(self):
 
141
        if sys.platform == 'win32':
 
142
            raise TestSkipped('chmod has no effect on win32')
 
143
        elif sys.platform == 'darwin':
 
144
            # OS X creates temp dirs with the 'wheel' group, which users are
 
145
            # not likely to be in, and this prevents us from setting the sgid
 
146
            # bit
 
147
            os.chown(self.test_dir, os.getuid(), os.getgid())
 
148
 
 
149
        t = self.make_branch_and_tree('.')
 
150
        b = t.branch
 
151
 
141
152
        # Test the group sticky bit
142
153
        # Recursively update the modes of all files
143
154
        chmod_r('.bzr', 0664, 02775)