comparison mercurial/localrepo.py @ 29826:93b44aa17691

manifest: use property instead of field for manifest revlog storage The file caches we're using to avoid reloading the manifest from disk everytime has an annoying bug that causes the in memory structure to not be reloaded if the mtime and the size haven't changed. This causes a breakage in the tests because the manifestlog is not being reloaded after a commit+strip operation in mq (the mtime is the same because it all happens in the same second, and the resulting size is the same because we add 1 and remove 1). The only reason this doesn't affect the manifest itself is because we touch it so often that we had already reloaded it after the commit, but before the strip. Once the entire manifest has migrated to manifestlog, we can get rid of these properties, since then the manifestlog will be touched after the commit, but before the strip, as well.
author Durham Goode <durham@fb.com>
date Wed, 17 Aug 2016 13:25:13 -0700
parents 426d931e5db2
children 0c8c388c7d62
comparison
equal deleted inserted replaced
29825:426d931e5db2 29826:93b44aa17691
502 502
503 @storecache('00manifest.i') 503 @storecache('00manifest.i')
504 def manifest(self): 504 def manifest(self):
505 return manifest.manifest(self.svfs) 505 return manifest.manifest(self.svfs)
506 506
507 @storecache('00manifest.i') 507 @property
508 def manifestlog(self): 508 def manifestlog(self):
509 return manifest.manifestlog(self.svfs, self.manifest) 509 return manifest.manifestlog(self.svfs, self)
510 510
511 @repofilecache('dirstate') 511 @repofilecache('dirstate')
512 def dirstate(self): 512 def dirstate(self):
513 return dirstate.dirstate(self.vfs, self.ui, self.root, 513 return dirstate.dirstate(self.vfs, self.ui, self.root,
514 self._dirstatevalidate) 514 self._dirstatevalidate)