Patchwork D11168: mergestate: use `update_file` to handle `for ACTION_ADD_MODIFIED`

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 2:09 p.m.
Message ID <differential-rev-PHID-DREV-76fvu7og3jzgxwgcxq4t-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49482/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 2:09 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/D11168

AFFECTED FILES
  mercurial/mergestate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -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)