hgext/convert/gnuarch.py
changeset 39838 28626957395a
parent 39831 c31ce080eb75
child 39909 5fe0b880200e
equal deleted inserted replaced
39837:85a474adaf26 39838:28626957395a
    16 from mercurial.i18n import _
    16 from mercurial.i18n import _
    17 from mercurial import (
    17 from mercurial import (
    18     encoding,
    18     encoding,
    19     error,
    19     error,
    20     pycompat,
    20     pycompat,
       
    21     util,
    21 )
    22 )
    22 from mercurial.utils import (
    23 from mercurial.utils import (
    23     dateutil,
    24     dateutil,
    24     procutil,
    25     procutil,
    25 )
    26 )
   226             if mode:
   227             if mode:
   227                 mode = 'l'
   228                 mode = 'l'
   228             else:
   229             else:
   229                 mode = ''
   230                 mode = ''
   230         else:
   231         else:
   231             data = open(os.path.join(self.tmppath, name), 'rb').read()
   232             data = util.readfile(os.path.join(self.tmppath, name))
   232             mode = (mode & 0o111) and 'x' or ''
   233             mode = (mode & 0o111) and 'x' or ''
   233         return data, mode
   234         return data, mode
   234 
   235 
   235     def _exclude(self, name):
   236     def _exclude(self, name):
   236         exclude = ['{arch}', '.arch-ids', '.arch-inventory']
   237         exclude = ['{arch}', '.arch-ids', '.arch-inventory']