mercurial/scmutil.py
changeset 29718 2dd8c225e94c
parent 29714 69109052d9ac
child 29758 2372182e505b
equal deleted inserted replaced
29716:37b6f0ec6241 29718:2dd8c225e94c
   254         except IOError as inst:
   254         except IOError as inst:
   255             if inst.errno != errno.ENOENT:
   255             if inst.errno != errno.ENOENT:
   256                 raise
   256                 raise
   257         return []
   257         return []
   258 
   258 
   259     def open(self, path, mode="r", text=False, atomictemp=False,
   259     @util.propertycache
   260              notindexed=False, backgroundclose=False):
   260     def open(self):
   261         '''Open ``path`` file, which is relative to vfs root.
   261         '''Open ``path`` file, which is relative to vfs root.
   262 
   262 
   263         Newly created directories are marked as "not to be indexed by
   263         Newly created directories are marked as "not to be indexed by
   264         the content indexing service", if ``notindexed`` is specified
   264         the content indexing service", if ``notindexed`` is specified
   265         for "write" mode access.
   265         for "write" mode access.
   266         '''
   266         '''
   267         self.open = self.__call__
   267         return self.__call__
   268         return self.__call__(path, mode, text, atomictemp, notindexed,
       
   269                              backgroundclose=backgroundclose)
       
   270 
   268 
   271     def read(self, path):
   269     def read(self, path):
   272         with self(path, 'rb') as fp:
   270         with self(path, 'rb') as fp:
   273             return fp.read()
   271             return fp.read()
   274 
   272