##// END OF EJS Templates
subrepo: replace direct file APIs around "writelines" by "vfs.writelines"...
FUJIWARA Katsunori -
r23372:6cfa7a73 default
parent child Browse files
Show More
@@ -581,18 +581,12 b' class hgsubrepo(abstractsubrepo):'
581 581 Each remote repo requires its own store hash cache, because a subrepo
582 582 store may be "clean" versus a given remote repo, but not versus another
583 583 '''
584 cachefile = self._getstorehashcachepath(remotepath)
584 cachefile = _getstorehashcachename(remotepath)
585 585 lock = self._repo.lock()
586 586 try:
587 587 storehash = list(self._calcstorehash(remotepath))
588 cachedir = os.path.dirname(cachefile)
589 if not os.path.exists(cachedir):
590 util.makedirs(cachedir, notindexed=True)
591 fd = open(cachefile, 'w')
592 try:
593 fd.writelines(storehash)
594 finally:
595 fd.close()
588 vfs = self._cachestorehashvfs
589 vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
596 590 finally:
597 591 lock.release()
598 592
General Comments 0
You need to be logged in to leave comments. Login now