Mercurial > hg
comparison mercurial/store.py @ 42905: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 |
comparison
equal
deleted
inserted
replaced
42904:d26a6706b070 | 42905:3df3b139a43d |
---|---|
13 import os | 13 import os |
14 import stat | 14 import stat |
15 | 15 |
16 from .i18n import _ | 16 from .i18n import _ |
17 from . import ( | 17 from . import ( |
18 changelog, | |
18 error, | 19 error, |
20 manifest, | |
19 node, | 21 node, |
20 policy, | 22 policy, |
21 pycompat, | 23 pycompat, |
22 util, | 24 util, |
23 vfs as vfsmod, | 25 vfs as vfsmod, |
377 elif kind == stat.S_IFDIR and recurse: | 379 elif kind == stat.S_IFDIR and recurse: |
378 visit.append(fp) | 380 visit.append(fp) |
379 l.sort() | 381 l.sort() |
380 return l | 382 return l |
381 | 383 |
384 def changelog(self, trypending): | |
385 return changelog.changelog(self.vfs, trypending=trypending) | |
386 | |
387 def manifestlog(self, repo, storenarrowmatch): | |
388 rootstore = manifest.manifestrevlog(self.vfs) | |
389 return manifest.manifestlog( | |
390 self.vfs, repo, rootstore, storenarrowmatch) | |
391 | |
382 def datafiles(self, matcher=None): | 392 def datafiles(self, matcher=None): |
383 return self._walk('data', True) + self._walk('meta', True) | 393 return self._walk('data', True) + self._walk('meta', True) |
384 | 394 |
385 def topfiles(self): | 395 def topfiles(self): |
386 # yield manifest before changelog | 396 # yield manifest before changelog |