largefile: use `update_file` instead of `add` in `synclfdirstate`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 08:59:00 +0200
changeset 47755 9e9c82d6f96f
parent 47754 4d845260a713
child 47756 7a06e04cbd68
largefile: use `update_file` instead of `add` in `synclfdirstate` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11197
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Mon Jul 19 03:19:06 2021 +0200
+++ b/hgext/largefiles/lfutil.py	Mon Jul 19 08:59:00 2021 +0200
@@ -575,7 +575,7 @@
         elif state == b'r':
             lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=False)
         elif state == b'a':
-            lfdirstate.add(lfile)
+            lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True)
 
 
 def markcommitted(orig, ctx, node):