D11164: largefile: use `update_file` instead of `normallookup` in `updatelfiles`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jul 19 14:08:57 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is the newer, more semantic API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11164

AFFECTED FILES
  hgext/largefiles/lfcommands.py

CHANGE DETAILS

diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -548,7 +548,12 @@
                         # use normallookup() to allocate an entry in largefiles
                         # dirstate to prevent lfilesrepo.status() from reporting
                         # missing files as removed.
-                        lfdirstate.normallookup(lfile)
+                        lfdirstate.update_file(
+                            lfile,
+                            p1_tracked=True,
+                            wc_tracked=True,
+                            possibly_dirty=True,
+                        )
                         update[lfile] = expecthash
                 else:
                     # Remove lfiles for which the standin is deleted, unless the



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list