large-files: use `running_status` in `updatestandinsbymatch`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 22 Feb 2023 00:21:57 +0100
changeset 50137 302772099ac4
parent 50136 b38b53c5674e
child 50138 270dc01481af
large-files: use `running_status` in `updatestandinsbymatch` This is the way.
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Wed Feb 22 00:19:00 2023 +0100
+++ b/hgext/largefiles/lfutil.py	Wed Feb 22 00:21:57 2023 +0100
@@ -691,11 +691,16 @@
         # It can cost a lot of time (several seconds)
         # otherwise to update all standins if the largefiles are
         # large.
-        lfdirstate = openlfdirstate(ui, repo)
         dirtymatch = matchmod.always()
-        unsure, s, mtime_boundary = lfdirstate.status(
-            dirtymatch, subrepos=[], ignored=False, clean=False, unknown=False
-        )
+        with repo.dirstate.running_status(repo):
+            lfdirstate = openlfdirstate(ui, repo)
+            unsure, s, mtime_boundary = lfdirstate.status(
+                dirtymatch,
+                subrepos=[],
+                ignored=False,
+                clean=False,
+                unknown=False,
+            )
         modifiedfiles = unsure + s.modified + s.added + s.removed
         lfiles = listlfiles(repo)
         # this only loops through largefiles that exist (not