Rev 5690: (jelmer) Enable the FreeBSD hacks in test_permissions for Debian in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Feb 26 15:48:04 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5690 [merge]
revision-id: pqm at pqm.ubuntu.com-20110226154801-fpsu7s5i4pimis6t
parent: pqm at pqm.ubuntu.com-20110225172059-f0741d5sru2n14g2
parent: jelmer at samba.org-20110225152422-d1pjdfnzsw5ufe2x
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2011-02-26 15:48:01 +0000
message:
  (jelmer) Enable the FreeBSD hacks in test_permissions for Debian
   GNU/kFreeBSD based systems. (Jelmer Vernooij)
modified:
  bzrlib/tests/per_branch/test_permissions.py test_permissions.py-20060210110243-245c01403bf0fde6
  bzrlib/tests/test_permissions.py test_permissions.py-20051215004520-ccf475789c80e80c
=== modified file 'bzrlib/tests/per_branch/test_permissions.py'
--- a/bzrlib/tests/per_branch/test_permissions.py	2010-06-20 11:18:38 +0000
+++ b/bzrlib/tests/per_branch/test_permissions.py	2011-02-25 15:24:22 +0000
@@ -90,10 +90,10 @@
                                           ' permission logic')
         if sys.platform == 'win32':
             raise tests.TestNotApplicable('chmod has no effect on win32')
-        elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
-            # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
-            # users are not likely to be in, and this prevents us from setting
-            # the sgid bit
+        elif sys.platform == 'darwin' or 'freebsd' in sys.platform:
+            # FreeBSD-based platforms create temp dirs with the 'wheel' group,
+            # which users are not likely to be in, and this prevents us
+            # from setting the sgid bit
             os.chown(self.test_dir, os.getuid(), os.getgid())
         # also, these are BzrBranch format specific things..
         t = self.make_branch_and_tree('.')

=== modified file 'bzrlib/tests/test_permissions.py'
--- a/bzrlib/tests/test_permissions.py	2011-01-27 14:27:18 +0000
+++ b/bzrlib/tests/test_permissions.py	2011-02-25 15:24:22 +0000
@@ -138,10 +138,10 @@
     def test_new_files_group_sticky_bit(self):
         if sys.platform == 'win32':
             raise TestSkipped('chmod has no effect on win32')
-        elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
-            # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
-            # users are not likely to be in, and this prevents us from setting
-            # the sgid bit
+        elif sys.platform == 'darwin' or 'freebsd' in sys.platform:
+            # FreeBSD-based platforms create temp dirs with the 'wheel' group,
+            # which users are not likely to be in, and this prevents us from
+            # setting the sgid bit
             os.chown(self.test_dir, os.getuid(), os.getgid())
 
         t = self.make_branch_and_tree('.')




More information about the bazaar-commits mailing list