diff mercurial/repair.py @ 50471:521fec115dad

store: use a StoreEntry object instead of tuple for store files We want to make the store return more semantic information instead of a stream of file path. To achieve this, we start with adding a simple object that hold the same information as the tuple it replace, and do a simple update to the user code to fetch and use the same information. From there, we will be able to iteratively upgrade the codebase toward better objects.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 15 May 2023 08:56:23 +0200
parents c5e93c915ab6
children 92611344aec2
line wrap: on
line diff
--- a/mercurial/repair.py	Mon May 15 08:56:08 2023 +0200
+++ b/mercurial/repair.py	Mon May 15 08:56:23 2023 +0200
@@ -444,7 +444,9 @@
     if scmutil.istreemanifest(repo):
         # This logic is safe if treemanifest isn't enabled, but also
         # pointless, so we skip it if treemanifest isn't enabled.
-        for t, unencoded, size in repo.store.datafiles():
+        for entry in repo.store.datafiles():
+            unencoded = entry.unencoded_path
+            # XXX use the entry.revlog_type instead
             if unencoded.startswith(b'meta/') and unencoded.endswith(
                 b'00manifest.i'
             ):