Mercurial > public > mercurial-scm > hg-stable
diff mercurial/store.py @ 42911:3df3b139a43d
localrepo: push manifestlog and changelog construction code into store
This feels substantially more appropriate, as the store is actually
the layer with knowledge of how to handle this storage. I didn't move
the caching decorators for now because that's going to require some
more involved work, and this unblocks my current experimentation.
Differential Revision: https://phab.mercurial-scm.org/D6732
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 15 Aug 2019 14:53:27 -0400 |
parents | f59f8a5e9096 |
children | 2372284d9457 |
line wrap: on
line diff
--- a/mercurial/store.py Sat Sep 07 12:49:33 2019 +0200 +++ b/mercurial/store.py Thu Aug 15 14:53:27 2019 -0400 @@ -15,7 +15,9 @@ from .i18n import _ from . import ( + changelog, error, + manifest, node, policy, pycompat, @@ -379,6 +381,14 @@ l.sort() return l + def changelog(self, trypending): + return changelog.changelog(self.vfs, trypending=trypending) + + def manifestlog(self, repo, storenarrowmatch): + rootstore = manifest.manifestrevlog(self.vfs) + return manifest.manifestlog( + self.vfs, repo, rootstore, storenarrowmatch) + def datafiles(self, matcher=None): return self._walk('data', True) + self._walk('meta', True)