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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jul 19 14:11:09 UTC 2021


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

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



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


More information about the Mercurial-devel mailing list