mergestate: use `update_file` to handle for `ACTION_ADD_MODIFIED`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 05:44:57 +0200
changeset 47726 8e2e8d0a9a56
parent 47725 1f3a87a7a9b1
child 47727 0e581d7e89b7
mergestate: use `update_file` to handle for `ACTION_ADD_MODIFIED` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11168
mercurial/mergestate.py
--- a/mercurial/mergestate.py	Mon Jul 19 05:47:54 2021 +0200
+++ b/mercurial/mergestate.py	Mon Jul 19 05:44:57 2021 +0200
@@ -768,7 +768,9 @@
     # re-add/mark as modified
     for f, args, msg in actions.get(ACTION_ADD_MODIFIED, []):
         if branchmerge:
-            repo.dirstate.normallookup(f)
+            repo.dirstate.update_file(
+                f, p1_tracked=True, wc_tracked=True, possibly_dirty=True
+            )
         else:
             repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True)