changeset 50104:c3c8ac540513

largefiles: rely on the higher level `changing_giles` in `mergerecordupdates` Now that context open on the main dirstate also affect the underlying one, we can skip opening our own in `mergerecordupdates`
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 04 Feb 2023 16:54:46 +0100
parents 3c431f7551dd
children 088ee6adfb09
files hgext/largefiles/overrides.py
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Wed Dec 14 00:46:58 2022 +0100
+++ b/hgext/largefiles/overrides.py	Sat Feb 04 16:54:46 2023 +0100
@@ -683,18 +683,12 @@
 def mergerecordupdates(orig, repo, actions, branchmerge, getfiledata):
     if MERGE_ACTION_LARGEFILE_MARK_REMOVED in actions:
         lfdirstate = lfutil.openlfdirstate(repo.ui, repo)
-        with lfdirstate.changing_parents(repo):
-            for lfile, args, msg in actions[
-                MERGE_ACTION_LARGEFILE_MARK_REMOVED
-            ]:
-                # this should be executed before 'orig', to execute 'remove'
-                # before all other actions
-                repo.dirstate.update_file(
-                    lfile, p1_tracked=True, wc_tracked=False
-                )
-                # make sure lfile doesn't get synclfdirstate'd as normal
-                lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True)
-        lfdirstate.write(repo.currenttransaction())
+        for lfile, args, msg in actions[MERGE_ACTION_LARGEFILE_MARK_REMOVED]:
+            # this should be executed before 'orig', to execute 'remove'
+            # before all other actions
+            repo.dirstate.update_file(lfile, p1_tracked=True, wc_tracked=False)
+            # make sure lfile doesn't get synclfdirstate'd as normal
+            lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True)
 
     return orig(repo, actions, branchmerge, getfiledata)