Mercurial > hg
changeset 47706:5bbf304271a0
context: use `update_file` instead of `normal` in `markcommitted`
This is the newer, more semantic API.
Differential Revision: https://phab.mercurial-scm.org/D11148
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 19 Jul 2021 03:15:57 +0200 |
parents | 6975cef3add1 |
children | 61753b1ba96f |
files | mercurial/context.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Mon Jul 19 01:44:24 2021 +0200 +++ b/mercurial/context.py Mon Jul 19 03:15:57 2021 +0200 @@ -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)