Patchwork D11189: sparse: use `update_file` instead of `drop` in `refreshwdir`

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

Comments

phabricator - July 19, 2021, 3:44 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/D11189

AFFECTED FILES
  mercurial/sparse.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/sparse.py b/mercurial/sparse.py
--- a/mercurial/sparse.py
+++ b/mercurial/sparse.py
@@ -568,7 +568,7 @@ 
         dirstate.update_file(file, p1_tracked=True, wc_tracked=True)
 
     for file in dropped:
-        dirstate.drop(file)
+        dirstate.update_file(file, p1_tracked=False, wc_tracked=False)
 
     for file in lookup:
         # File exists on disk, and we're bringing it back in an unknown state.