Show More
@@ -552,7 +552,7 b' def unixpath(path):' | |||
|
552 | 552 | def islfilesrepo(repo): |
|
553 | 553 | '''Return true if the repo is a largefile repo.''' |
|
554 | 554 | if b'largefiles' in repo.requirements: |
|
555 |
for entry in repo.store.data |
|
|
555 | for entry in repo.store.data_entries(): | |
|
556 | 556 | if entry.is_revlog and shortnameslash in entry.target_id: |
|
557 | 557 | return True |
|
558 | 558 |
@@ -460,7 +460,7 b' def reposetup(ui, repo):' | |||
|
460 | 460 | if b'largefiles' in repo.requirements: |
|
461 | 461 | return |
|
462 | 462 | marker = lfutil.shortnameslash |
|
463 |
for entry in repo.store.data |
|
|
463 | for entry in repo.store.data_entries(): | |
|
464 | 464 | # XXX note that this match is not rooted and can wrongly match |
|
465 | 465 | # directory ending with ".hglf" |
|
466 | 466 | if entry.is_revlog and marker in entry.target_id: |
@@ -288,7 +288,7 b' def _narrow(' | |||
|
288 | 288 | repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) |
|
289 | 289 | |
|
290 | 290 | todelete = [] |
|
291 |
for entry in repo.store.data |
|
|
291 | for entry in repo.store.data_entries(): | |
|
292 | 292 | if not entry.is_revlog: |
|
293 | 293 | continue |
|
294 | 294 | if entry.is_filelog: |
@@ -375,7 +375,7 b' class manifestrevlogstore:' | |||
|
375 | 375 | ledger.markdataentry(self, treename, node) |
|
376 | 376 | ledger.markhistoryentry(self, treename, node) |
|
377 | 377 | |
|
378 |
for t, path, size in self._store.data |
|
|
378 | for t, path, size in self._store.data_entries(): | |
|
379 | 379 | if path[:5] != b'meta/' or path[-2:] != b'.i': |
|
380 | 380 | continue |
|
381 | 381 |
@@ -172,7 +172,7 b' def onetimesetup(ui):' | |||
|
172 | 172 | visit.append(fp) |
|
173 | 173 | |
|
174 | 174 | if scmutil.istreemanifest(repo): |
|
175 |
for entry in repo.store.data |
|
|
175 | for entry in repo.store.data_entries(): | |
|
176 | 176 | if not entry.is_revlog: |
|
177 | 177 | continue |
|
178 | 178 | if entry.is_manifestlog: |
@@ -181,7 +181,7 b' def onetimesetup(ui):' | |||
|
181 | 181 | # Return .d and .i files that do not match the shallow pattern |
|
182 | 182 | match = state.match |
|
183 | 183 | if match and not match.always(): |
|
184 |
for entry in repo.store.data |
|
|
184 | for entry in repo.store.data_entries(): | |
|
185 | 185 | if not entry.is_revlog: |
|
186 | 186 | continue |
|
187 | 187 | if not state.match(entry.target_id): |
@@ -445,7 +445,7 b' def manifestrevlogs(repo):' | |||
|
445 | 445 | if scmutil.istreemanifest(repo): |
|
446 | 446 | # This logic is safe if treemanifest isn't enabled, but also |
|
447 | 447 | # pointless, so we skip it if treemanifest isn't enabled. |
|
448 |
for entry in repo.store.data |
|
|
448 | for entry in repo.store.data_entries(): | |
|
449 | 449 | if not entry.is_revlog: |
|
450 | 450 | continue |
|
451 | 451 | if entry.revlog_type == store.FILEFLAGS_MANIFESTLOG: |
@@ -824,7 +824,7 b' def repair_issue6528(' | |||
|
824 | 824 | with context(): |
|
825 | 825 | files = list( |
|
826 | 826 | entry |
|
827 |
for entry in repo.store.data |
|
|
827 | for entry in repo.store.data_entries() | |
|
828 | 828 | if entry.is_revlog and entry.is_filelog |
|
829 | 829 | ) |
|
830 | 830 |
@@ -654,7 +654,7 b' class basicstore:' | |||
|
654 | 654 | rootstore = manifest.manifestrevlog(repo.nodeconstants, self.vfs) |
|
655 | 655 | return manifest.manifestlog(self.vfs, repo, rootstore, storenarrowmatch) |
|
656 | 656 | |
|
657 |
def data |
|
|
657 | def data_entries( | |
|
658 | 658 | self, matcher=None, undecodable=None |
|
659 | 659 | ) -> Generator[BaseStoreEntry, None, None]: |
|
660 | 660 | """Like walk, but excluding the changelog and root manifest. |
@@ -735,7 +735,7 b' class basicstore:' | |||
|
735 | 735 | are passed with matches the matcher |
|
736 | 736 | """ |
|
737 | 737 | # yield data files first |
|
738 |
for x in self.data |
|
|
738 | for x in self.data_entries(matcher): | |
|
739 | 739 | yield x |
|
740 | 740 | for x in self.topfiles(): |
|
741 | 741 | yield x |
@@ -790,10 +790,12 b' class encodedstore(basicstore):' | |||
|
790 | 790 | new.append((f2, value)) |
|
791 | 791 | return new |
|
792 | 792 | |
|
793 |
def data |
|
|
793 | def data_entries( | |
|
794 | 794 | self, matcher=None, undecodable=None |
|
795 | 795 | ) -> Generator[BaseStoreEntry, None, None]: |
|
796 |
entries = super(encodedstore, self).data |
|
|
796 | entries = super(encodedstore, self).data_entries( | |
|
797 | undecodable=undecodable | |
|
798 | ) | |
|
797 | 799 | for entry in entries: |
|
798 | 800 | if _match_tracked_entry(entry, matcher): |
|
799 | 801 | yield entry |
@@ -992,7 +994,7 b' class fncachestore(basicstore):' | |||
|
992 | 994 | def getsize(self, path): |
|
993 | 995 | return self.rawvfs.stat(path).st_size |
|
994 | 996 | |
|
995 |
def data |
|
|
997 | def data_entries( | |
|
996 | 998 | self, matcher=None, undecodable=None |
|
997 | 999 | ) -> Generator[BaseStoreEntry, None, None]: |
|
998 | 1000 | files = ((f, revlog_type(f)) for f in self.fncache) |
@@ -407,7 +407,7 b' class verifier:' | |||
|
407 | 407 | subdirs = set() |
|
408 | 408 | revlogv1 = self.revlogv1 |
|
409 | 409 | undecodable = [] |
|
410 |
for entry in repo.store.data |
|
|
410 | for entry in repo.store.data_entries(undecodable=undecodable): | |
|
411 | 411 | for file_ in entry.files(): |
|
412 | 412 | f = file_.unencoded_path |
|
413 | 413 | size = file_.file_size(repo.store.vfs) |
@@ -475,7 +475,7 b' class verifier:' | |||
|
475 | 475 | |
|
476 | 476 | storefiles = set() |
|
477 | 477 | undecodable = [] |
|
478 |
for entry in repo.store.data |
|
|
478 | for entry in repo.store.data_entries(undecodable=undecodable): | |
|
479 | 479 | for file_ in entry.files(): |
|
480 | 480 | size = file_.file_size(repo.store.vfs) |
|
481 | 481 | f = file_.unencoded_path |
@@ -664,8 +664,8 b' def issimplestorefile(f, kind, st):' | |||
|
664 | 664 | |
|
665 | 665 | |
|
666 | 666 | class simplestore(store.encodedstore): |
|
667 |
def data |
|
|
668 |
for x in super(simplestore, self).data |
|
|
667 | def data_entries(self, undecodable=None): | |
|
668 | for x in super(simplestore, self).data_entries(): | |
|
669 | 669 | yield x |
|
670 | 670 | |
|
671 | 671 | # Supplement with non-revlog files. |
General Comments 0
You need to be logged in to leave comments.
Login now