large-files: use `hacky_extension_update_file` one more time
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 19 Feb 2023 03:14:44 +0100
changeset 50151 c4b17bc78d8c
parent 50150 b900f40c343e
child 50152 5a0c1d70ebcf
large-files: use `hacky_extension_update_file` one more time This override is about merging and can be used in a `changing_parents` context. So lets use the method dedicated to hacky stuff when doing hacky stuff.
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Sun Feb 19 00:04:53 2023 -0500
+++ b/hgext/largefiles/overrides.py	Sun Feb 19 03:14:44 2023 +0100
@@ -1819,7 +1819,14 @@
         # mark all clean largefiles as dirty, just in case the update gets
         # interrupted before largefiles and lfdirstate are synchronized
         for lfile in oldclean:
-            lfdirstate.set_possibly_dirty(lfile)
+            entry = lfdirstate.get_entry(lfile)
+            lfdirstate.hacky_extension_update_file(
+                lfile,
+                wc_tracked=entry.tracked,
+                p1_tracked=entry.p1_tracked,
+                p2_info=entry.p2_info,
+                possibly_dirty=True,
+            )
         lfdirstate.write(repo.currenttransaction())
 
         oldstandins = lfutil.getstandinsstate(repo)