# HG changeset patch # User Pierre-Yves David # Date 1677022887 -3600 # Node ID 31be0b46fd47786976d0a22f287d3e4d75440593 # Parent 0d6173373fa5ce018f7dd1c302da7f88128c72b0 narrow: use `running_status` in `updateworkingcopy` This is the way. diff -r 0d6173373fa5 -r 31be0b46fd47 mercurial/narrowspec.py --- a/mercurial/narrowspec.py Mon Feb 20 17:26:41 2023 +0100 +++ b/mercurial/narrowspec.py Wed Feb 22 00:41:27 2023 +0100 @@ -322,10 +322,16 @@ 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: