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

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 2:08 p.m.
Message ID <differential-rev-PHID-DREV-iui7xqzjhcqgbmrx3ctr-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49476/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 2:08 p.m.
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




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

Patch

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