~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_permissions.py

Merge up through 2.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2008 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
38
38
from bzrlib.remote import RemoteBranchFormat
39
39
from bzrlib.tests.test_permissions import chmod_r, check_mode_r
40
40
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
41
 
from bzrlib.transport import get_transport
42
41
from bzrlib.workingtree import WorkingTree
43
42
 
44
43
 
91
90
                                          ' permission logic')
92
91
        if sys.platform == 'win32':
93
92
            raise tests.TestNotApplicable('chmod has no effect on win32')
94
 
        elif sys.platform == 'darwin':
95
 
            # OS X creates temp dirs with the 'wheel' group, which users are
96
 
            # not likely to be in, and this prevents us from setting the sgid
97
 
            # bit
 
93
        elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
 
94
            # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
 
95
            # users are not likely to be in, and this prevents us from setting
 
96
            # the sgid bit
98
97
            os.chown(self.test_dir, os.getuid(), os.getgid())
99
98
        # also, these are BzrBranch format specific things..
100
99
        t = self.make_branch_and_tree('.')