mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 03:48:52 -06:00
refactor: index the database by path once
model.database.record_at and sha1_at read one cached path index with normpath keys. They replace records_by_path of resolve.packfiles, the manifest's own sha1 index, the per-call indexes of regionaudit, emulatorcheck and hidden_extras, and the linear scan of held_record. resolve_sha1 drops its by_path argument. A path spelled with ./ or a doubled slash now finds its record everywhere; the database writes none, so the output is the same.
This commit is contained in:
1 parent
1c978f3083
commit
8bc1fcb5db
9 files changed
+55
-60
No files matched your search
@@ -78,7 +78,7 @@ class AnEntryWithoutSourceIsAnOmission(unittest.TestCase):
|
||||
|
||||
def test_a_copy_the_database_lacks_is_omitted(self):
|
||||
"""A copy the scan never indexed has no repo path: an omission."""
|
||||
with mock.patch.object(manifestentry, "_db_sha1_by_path", return_value={}):
|
||||
with mock.patch.object(manifestentry, "sha1_at", return_value=None):
|
||||
files, omitted, pack_only = self._run_core_entries(
|
||||
{"sha1": "0" * 40, "sha256": "0" * 64}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user