mercurial/archival.py
changeset 4688 8f91264f154a
parent 4652 06de65673ec2
child 4731 1d5a2ee683b0
equal deleted inserted replaced
4687:06a0e0557edc 4688:8f91264f154a
   131         self.date_time = time.gmtime(mtime)[:6]
   131         self.date_time = time.gmtime(mtime)[:6]
   132 
   132 
   133     def addfile(self, name, mode, data):
   133     def addfile(self, name, mode, data):
   134         i = zipfile.ZipInfo(self.prefix + name, self.date_time)
   134         i = zipfile.ZipInfo(self.prefix + name, self.date_time)
   135         i.compress_type = self.z.compression
   135         i.compress_type = self.z.compression
   136         i.flag_bits = 0x08
       
   137         # unzip will not honor unix file modes unless file creator is
   136         # unzip will not honor unix file modes unless file creator is
   138         # set to unix (id 3).
   137         # set to unix (id 3).
   139         i.create_system = 3
   138         i.create_system = 3
   140         i.external_attr = (mode | stat.S_IFREG) << 16L
   139         i.external_attr = (mode | stat.S_IFREG) << 16L
   141         self.z.writestr(i, data)
   140         self.z.writestr(i, data)