Patchwork D11187: context: use `update_file` instead of `drop` in `markcommitted`

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 3:44 p.m.
Message ID <differential-rev-PHID-DREV-c56hwej7d3b3vkvlzlqs-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49504/
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/D11187

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2026,7 +2026,9 @@ 
                     f, p1_tracked=True, wc_tracked=True
                 )
             for f in self.removed():
-                self._repo.dirstate.drop(f)
+                self._repo.dirstate.update_file(
+                    f, p1_tracked=False, wc_tracked=False
+                )
             self._repo.dirstate.setparents(node)
             self._repo._quick_access_changeid_invalidate()