diff mercurial/verify.py @ 50472:9fdc28e21b68

store: introduce a EntryFile object to actually access file info For now a StoreEntry match a single file, but the goal is to eventually combine multiple file in a higher level Entry, so we need to introduce this distinction and use it first.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 15 May 2023 08:56:40 +0200
parents 521fec115dad
children 4cbdfab6f812
line wrap: on
line diff
--- a/mercurial/verify.py	Mon May 15 08:56:23 2023 +0200
+++ b/mercurial/verify.py	Mon May 15 08:56:40 2023 +0200
@@ -408,11 +408,12 @@
             revlogv1 = self.revlogv1
             undecodable = []
             for entry in repo.store.datafiles(undecodable=undecodable):
-                f = entry.unencoded_path
-                size = entry.file_size
-                if (size > 0 or not revlogv1) and f.startswith(b'meta/'):
-                    storefiles.add(_normpath(f))
-                    subdirs.add(os.path.dirname(f))
+                for file_ in entry.files():
+                    f = file_.unencoded_path
+                    size = file_.file_size
+                    if (size > 0 or not revlogv1) and f.startswith(b'meta/'):
+                        storefiles.add(_normpath(f))
+                        subdirs.add(os.path.dirname(f))
             for f in undecodable:
                 self._err(None, _(b"cannot decode filename '%s'") % f)
             subdirprogress = ui.makeprogress(
@@ -475,10 +476,11 @@
         storefiles = set()
         undecodable = []
         for entry in repo.store.datafiles(undecodable=undecodable):
-            size = entry.file_size
-            f = entry.unencoded_path
-            if (size > 0 or not revlogv1) and f.startswith(b'data/'):
-                storefiles.add(_normpath(f))
+            for file_ in entry.files():
+                size = file_.file_size
+                f = file_.unencoded_path
+                if (size > 0 or not revlogv1) and f.startswith(b'data/'):
+                    storefiles.add(_normpath(f))
         for f in undecodable:
             self._err(None, _(b"cannot decode filename '%s'") % f)