Patchwork D11159: mq: replace usage of `normal` with newer API

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 10:44 a.m.
Message ID <differential-rev-PHID-DREV-liyb7e3rx45n7juy7i7t-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49475/
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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11159

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1855,7 +1855,9 @@ 
                     for f in m + r:
                         fctx = ctx[f]
                         repo.wwrite(f, fctx.data(), fctx.flags())
-                        repo.dirstate.normal(f)
+                        repo.dirstate.update_file(
+                            f, p1_tracked=True, wc_tracked=True
+                        )
                     repo.setparents(qp, repo.nullid)
             for patch in reversed(self.applied[start:end]):
                 self.ui.status(_(b"popping %s\n") % patch.name)
@@ -2047,7 +2049,7 @@ 
                             mm.append(m[i])
                             del m[i]
                     for f in m:
-                        repo.dirstate.normal(f)
+                        repo.dirstate.update_file_p1(f, p1_tracked=True)
                     for f in mm:
                         repo.dirstate.normallookup(f)
                     for f in forget: