Patchwork D11181: narrow: use `update_file` instead of `normallookup` after update

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

Comments

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

AFFECTED FILES
  mercurial/narrowspec.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py
--- a/mercurial/narrowspec.py
+++ b/mercurial/narrowspec.py
@@ -351,6 +351,6 @@ 
     addedmatch = matchmod.intersectmatchers(addedmatch, sparse.matcher(repo))
     newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds]
     for f in newfiles:
-        ds.normallookup(f)
+        ds.update_file(f, p1_tracked=True, wc_tracked=True, possibly_dirty=True)
     _writeaddedfiles(repo, pctx, newfiles)
     repo._updatingnarrowspec = False