# HG changeset patch # User Pierre-Yves David # Date 2021-07-19 01:15:57 # Node ID 5bbf304271a0346a49f726a902755bd729df7a03 # Parent 6975cef3add13fb6f35abc901e7911fe4894ae17 context: use `update_file` instead of `normal` in `markcommitted` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11148 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -2022,7 +2022,9 @@ class workingctx(committablectx): 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)