largefile: use `update_file` instead of `drop` in `synclfdirstate`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 09:14:24 +0200
changeset 47749 068e09499d4e
parent 47748 000ea893aad3
child 47750 13e2ce796dcd
largefile: use `update_file` instead of `drop` in `synclfdirstate` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11191
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Mon Jul 19 09:08:54 2021 +0200
+++ b/hgext/largefiles/lfutil.py	Mon Jul 19 09:14:24 2021 +0200
@@ -556,7 +556,7 @@
 def synclfdirstate(repo, lfdirstate, lfile, normallookup):
     lfstandin = standin(lfile)
     if lfstandin not in repo.dirstate:
-        lfdirstate.drop(lfile)
+        lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=False)
     else:
         stat = repo.dirstate._map[lfstandin]
         state, mtime = stat.state, stat.mtime