mercurial/subrepo.py
changeset 21889 ee7e8dcffc92
parent 21888 dfb8f757750c
child 21891 db8a27d92818
equal deleted inserted replaced
21888:dfb8f757750c 21889:ee7e8dcffc92
   594             storehash = list(self._calcstorehash(remotepath))
   594             storehash = list(self._calcstorehash(remotepath))
   595             cachedir = os.path.dirname(cachefile)
   595             cachedir = os.path.dirname(cachefile)
   596             if not os.path.exists(cachedir):
   596             if not os.path.exists(cachedir):
   597                 util.makedirs(cachedir, notindexed=True)
   597                 util.makedirs(cachedir, notindexed=True)
   598             fd = open(cachefile, 'w')
   598             fd = open(cachefile, 'w')
   599             fd.writelines(storehash)
   599             try:
   600             fd.close()
   600                 fd.writelines(storehash)
       
   601             finally:
       
   602                 fd.close()
   601         finally:
   603         finally:
   602             lock.release()
   604             lock.release()
   603 
   605 
   604     @annotatesubrepoerror
   606     @annotatesubrepoerror
   605     def _initrepo(self, parentrepo, source, create):
   607     def _initrepo(self, parentrepo, source, create):