##// 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 cachefile = self._getstorehashcachepath(remotepath)
587 cachefile = self._getstorehashcachepath(remotepath)
588 lock = self._repo.lock()
588 lock = self._repo.lock()
589 storehash = list(self._calcstorehash(remotepath))
589 try:
590 cachedir = os.path.dirname(cachefile)
590 storehash = list(self._calcstorehash(remotepath))
591 if not os.path.exists(cachedir):
591 cachedir = os.path.dirname(cachefile)
592 util.makedirs(cachedir, notindexed=True)
592 if not os.path.exists(cachedir):
593 fd = open(cachefile, 'w')
593 util.makedirs(cachedir, notindexed=True)
594 fd.writelines(storehash)
594 fd = open(cachefile, 'w')
595 fd.close()
595 fd.writelines(storehash)
596 lock.release()
596 fd.close()
597 finally:
598 lock.release()
597
599
598 @annotatesubrepoerror
600 @annotatesubrepoerror
599 def _initrepo(self, parentrepo, source, create):
601 def _initrepo(self, parentrepo, source, create):
General Comments 0
You need to be logged in to leave comments. Login now