Patchwork D11148: context: use `update_file` instead of `normal` in `markcommitted`

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

Comments

phabricator - July 19, 2021, 10:44 a.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/D11148

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
@@ -2022,7 +2022,9 @@ 
     def markcommitted(self, node):
         with self._repo.dirstate.parentchange():
             for f in self.modified() + self.added():
-                self._repo.dirstate.normal(f)
+                self._repo.dirstate.update_file(
+                    f, p1_tracked=True, wc_tracked=True
+                )
             for f in self.removed():
                 self._repo.dirstate.drop(f)
             self._repo.dirstate.setparents(node)