Mercurial > public > mercurial-scm > hg
diff mercurial/store.py @ 50501:862e3a13da44
store: rename `datafiles` to `data_entries`
The method is now returning StoreEntries let us rename the method for clarity.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 16 May 2023 10:43:36 +0200 |
parents | 1b776f25302f |
children | 32b4c2bbdb94 |
line wrap: on
line diff
--- a/mercurial/store.py Mon May 15 22:03:39 2023 +0200 +++ b/mercurial/store.py Tue May 16 10:43:36 2023 +0200 @@ -654,7 +654,7 @@ rootstore = manifest.manifestrevlog(repo.nodeconstants, self.vfs) return manifest.manifestlog(self.vfs, repo, rootstore, storenarrowmatch) - def datafiles( + def data_entries( self, matcher=None, undecodable=None ) -> Generator[BaseStoreEntry, None, None]: """Like walk, but excluding the changelog and root manifest. @@ -735,7 +735,7 @@ are passed with matches the matcher """ # yield data files first - for x in self.datafiles(matcher): + for x in self.data_entries(matcher): yield x for x in self.topfiles(): yield x @@ -790,10 +790,12 @@ new.append((f2, value)) return new - def datafiles( + def data_entries( self, matcher=None, undecodable=None ) -> Generator[BaseStoreEntry, None, None]: - entries = super(encodedstore, self).datafiles(undecodable=undecodable) + entries = super(encodedstore, self).data_entries( + undecodable=undecodable + ) for entry in entries: if _match_tracked_entry(entry, matcher): yield entry @@ -992,7 +994,7 @@ def getsize(self, path): return self.rawvfs.stat(path).st_size - def datafiles( + def data_entries( self, matcher=None, undecodable=None ) -> Generator[BaseStoreEntry, None, None]: files = ((f, revlog_type(f)) for f in self.fncache)