##// END OF EJS Templates
subrepo: ensure "lock.release()" execution at the end of "_cachestorehash()"...
FUJIWARA Katsunori -
r21886:b9e8fdc3 default
parent child Browse files
Show More
@@ -586,14 +586,16 b' class hgsubrepo(abstractsubrepo):'
586 586 '''
587 587 cachefile = self._getstorehashcachepath(remotepath)
588 588 lock = self._repo.lock()
589 storehash = list(self._calcstorehash(remotepath))
590 cachedir = os.path.dirname(cachefile)
591 if not os.path.exists(cachedir):
592 util.makedirs(cachedir, notindexed=True)
593 fd = open(cachefile, 'w')
594 fd.writelines(storehash)
595 fd.close()
596 lock.release()
589 try:
590 storehash = list(self._calcstorehash(remotepath))
591 cachedir = os.path.dirname(cachefile)
592 if not os.path.exists(cachedir):
593 util.makedirs(cachedir, notindexed=True)
594 fd = open(cachefile, 'w')
595 fd.writelines(storehash)
596 fd.close()
597 finally:
598 lock.release()
597 599
598 600 @annotatesubrepoerror
599 601 def _initrepo(self, parentrepo, source, create):
General Comments 0
You need to be logged in to leave comments. Login now