Mercurial > hg
comparison mercurial/narrowspec.py @ 47739:6a06155dfaef
narrow: use `update_file` instead of `normallookup` after update
This is the newer, more semantic API.
Differential Revision: https://phab.mercurial-scm.org/D11181
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 19 Jul 2021 08:44:49 +0200 |
parents | e4ccc341e65b |
children | 5bcd305389c7 |
comparison
equal
deleted
inserted
replaced
47738:c53008253113 | 47739:6a06155dfaef |
---|---|
349 | 349 |
350 # only update added files that are in the sparse checkout | 350 # only update added files that are in the sparse checkout |
351 addedmatch = matchmod.intersectmatchers(addedmatch, sparse.matcher(repo)) | 351 addedmatch = matchmod.intersectmatchers(addedmatch, sparse.matcher(repo)) |
352 newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds] | 352 newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds] |
353 for f in newfiles: | 353 for f in newfiles: |
354 ds.normallookup(f) | 354 ds.update_file(f, p1_tracked=True, wc_tracked=True, possibly_dirty=True) |
355 _writeaddedfiles(repo, pctx, newfiles) | 355 _writeaddedfiles(repo, pctx, newfiles) |
356 repo._updatingnarrowspec = False | 356 repo._updatingnarrowspec = False |