changeset 47723:0ed2f74f6e3a

largefile: replace the `normallookup` call when creating a new lfdirstate This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11165
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 02:44:11 +0200
parents 47dce5a99eab
children b0a39b666e2d
files hgext/largefiles/lfutil.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Mon Jul 19 05:46:16 2021 +0200
+++ b/hgext/largefiles/lfutil.py	Mon Jul 19 02:44:11 2021 +0200
@@ -229,9 +229,12 @@
         if len(standins) > 0:
             vfs.makedirs(lfstoredir)
 
-        for standin in standins:
-            lfile = splitstandin(standin)
-            lfdirstate.normallookup(lfile)
+        with lfdirstate.parentchange():
+            for standin in standins:
+                lfile = splitstandin(standin)
+                lfdirstate.update_file(
+                    lfile, p1_tracked=True, wc_tracked=True, possibly_dirty=True
+                )
     return lfdirstate