largefile: use `update_file` instead of `remove` in `mergerecordupdates`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 03:20:04 +0200
changeset 47698 9fa1085fbd63
parent 47697 c9e412712e0c
child 47699 034979d24c7b
largefile: use `update_file` instead of `remove` in `mergerecordupdates` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11140
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Sat Jul 17 00:15:31 2021 +0200
+++ b/hgext/largefiles/overrides.py	Mon Jul 19 03:20:04 2021 +0200
@@ -654,7 +654,9 @@
             ]:
                 # this should be executed before 'orig', to execute 'remove'
                 # before all other actions
-                repo.dirstate.remove(lfile)
+                repo.dirstate.update_file(
+                    lfile, p1_tracked=True, wc_tracked=False
+                )
                 # make sure lfile doesn't get synclfdirstate'd as normal
                 lfdirstate.add(lfile)
         lfdirstate.write()