comparison mercurial/localrepo.py @ 38128:1cba497491be

narrow: only wrap dirstate functions once, instead of per-reposetup chg will call reposetup multiple times, and we would end up double-wrapping (or worse) the dirstate functions; this can cause issues like OSError 'No such file or directory' during rebase operations, when we go to double-delete our narrowspec backup file. Differential Revision: https://phab.mercurial-scm.org/D3559
author Kyle Lippincott <spectral@google.com>
date Wed, 16 May 2018 14:59:32 -0700
parents 6e2259847f5f
children 2b8cb0ab231c
comparison
equal deleted inserted replaced
38127:b7e5c53a779e 38128:1cba497491be
776 def manifestlog(self): 776 def manifestlog(self):
777 return manifest.manifestlog(self.svfs, self) 777 return manifest.manifestlog(self.svfs, self)
778 778
779 @repofilecache('dirstate') 779 @repofilecache('dirstate')
780 def dirstate(self): 780 def dirstate(self):
781 return self._makedirstate()
782
783 def _makedirstate(self):
781 sparsematchfn = lambda: sparse.matcher(self) 784 sparsematchfn = lambda: sparse.matcher(self)
782 785
783 return dirstate.dirstate(self.vfs, self.ui, self.root, 786 return dirstate.dirstate(self.vfs, self.ui, self.root,
784 self._dirstatevalidate, sparsematchfn) 787 self._dirstatevalidate, sparsematchfn)
785 788