Rev 4837: (robertc) Change permissions in exported .zip files to 644. (Ivan in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Nov 30 10:46:18 GMT 2009


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

------------------------------------------------------------
revno: 4837 [merge]
revision-id: pqm at pqm.ubuntu.com-20091130104616-pz4yrhyl4touxrsi
parent: pqm at pqm.ubuntu.com-20091130061212-qky611tap8132jyk
parent: maniac at maniac-laptop-20091125001405-lvtkl1irhrz9mtdu
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-11-30 10:46:16 +0000
message:
  (robertc) Change permissions in exported .zip files to 644. (Ivan
  	Sagalaev)
modified:
  bzrlib/export/zip_exporter.py  zip_exporter.py-20051114235828-8f57f954fba6497e
  bzrlib/tests/blackbox/test_export.py test_export.py-20051229024010-e6c26658e460fb1c
=== modified file 'bzrlib/export/zip_exporter.py'
--- a/bzrlib/export/zip_exporter.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/export/zip_exporter.py	2009-11-25 00:14:05 +0000
@@ -36,8 +36,9 @@
 # Windows expects this bit to be set in the 'external_attr' section
 # Or it won't consider the entry a directory
 ZIP_DIRECTORY_BIT = (1 << 4)
+FILE_PERMISSIONS = (0644 << 16)
 
-_FILE_ATTR = stat.S_IFREG
+_FILE_ATTR = stat.S_IFREG | FILE_PERMISSIONS
 _DIR_ATTR = stat.S_IFDIR | ZIP_DIRECTORY_BIT
 
 

=== modified file 'bzrlib/tests/blackbox/test_export.py'
--- a/bzrlib/tests/blackbox/test_export.py	2009-06-10 03:56:49 +0000
+++ b/bzrlib/tests/blackbox/test_export.py	2009-11-25 00:14:05 +0000
@@ -141,7 +141,7 @@
         # forward slashes
         self.assertEqual(['test/a', 'test/b/', 'test/b/c', 'test/d/'], names)
 
-        file_attr = stat.S_IFREG
+        file_attr = stat.S_IFREG | export.zip_exporter.FILE_PERMISSIONS
         dir_attr = stat.S_IFDIR | export.zip_exporter.ZIP_DIRECTORY_BIT
 
         a_info = zfile.getinfo(names[0])




More information about the bazaar-commits mailing list