##// END OF EJS Templates
with: use context manager in subrepo _cachestorehash
Bryan O'Sullivan -
r27843:b2efdb66 default
parent child Browse files
Show More
@@ -679,13 +679,10 b' class hgsubrepo(abstractsubrepo):'
679 store may be "clean" versus a given remote repo, but not versus another
679 store may be "clean" versus a given remote repo, but not versus another
680 '''
680 '''
681 cachefile = _getstorehashcachename(remotepath)
681 cachefile = _getstorehashcachename(remotepath)
682 lock = self._repo.lock()
682 with self._repo.lock():
683 try:
684 storehash = list(self._calcstorehash(remotepath))
683 storehash = list(self._calcstorehash(remotepath))
685 vfs = self._cachestorehashvfs
684 vfs = self._cachestorehashvfs
686 vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
685 vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
687 finally:
688 lock.release()
689
686
690 def _getctx(self):
687 def _getctx(self):
691 '''fetch the context for this subrepo revision, possibly a workingctx
688 '''fetch the context for this subrepo revision, possibly a workingctx
General Comments 0
You need to be logged in to leave comments. Login now