# HG changeset patch # User Pierre-Yves David # Date 2023-02-21 23:41:27 # Node ID 31be0b46fd47786976d0a22f287d3e4d75440593 # Parent 0d6173373fa5ce018f7dd1c302da7f88128c72b0 narrow: use `running_status` in `updateworkingcopy` This is the way. diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py --- a/mercurial/narrowspec.py +++ b/mercurial/narrowspec.py @@ -322,10 +322,16 @@ def updateworkingcopy(repo, assumeclean= addedmatch = matchmod.differencematcher(newmatch, oldmatch) removedmatch = matchmod.differencematcher(oldmatch, newmatch) + assert repo.currentwlock() is not None ds = repo.dirstate - lookup, status, _mtime_boundary = ds.status( - removedmatch, subrepos=[], ignored=True, clean=True, unknown=True - ) + with ds.running_status(repo): + lookup, status, _mtime_boundary = ds.status( + removedmatch, + subrepos=[], + ignored=True, + clean=True, + unknown=True, + ) trackeddirty = status.modified + status.added clean = status.clean if assumeclean: