Mercurial > hg
comparison mercurial/narrowspec.py @ 50135:31be0b46fd47
narrow: use `running_status` in `updateworkingcopy`
This is the way.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 22 Feb 2023 00:41:27 +0100 |
parents | 6000f5b25c9b |
children | 99296ca9f29e |
comparison
equal
deleted
inserted
replaced
50134:0d6173373fa5 | 50135:31be0b46fd47 |
---|---|
320 oldmatch = match(repo.root, include=oldincludes, exclude=oldexcludes) | 320 oldmatch = match(repo.root, include=oldincludes, exclude=oldexcludes) |
321 newmatch = match(repo.root, include=newincludes, exclude=newexcludes) | 321 newmatch = match(repo.root, include=newincludes, exclude=newexcludes) |
322 addedmatch = matchmod.differencematcher(newmatch, oldmatch) | 322 addedmatch = matchmod.differencematcher(newmatch, oldmatch) |
323 removedmatch = matchmod.differencematcher(oldmatch, newmatch) | 323 removedmatch = matchmod.differencematcher(oldmatch, newmatch) |
324 | 324 |
325 assert repo.currentwlock() is not None | |
325 ds = repo.dirstate | 326 ds = repo.dirstate |
326 lookup, status, _mtime_boundary = ds.status( | 327 with ds.running_status(repo): |
327 removedmatch, subrepos=[], ignored=True, clean=True, unknown=True | 328 lookup, status, _mtime_boundary = ds.status( |
328 ) | 329 removedmatch, |
330 subrepos=[], | |
331 ignored=True, | |
332 clean=True, | |
333 unknown=True, | |
334 ) | |
329 trackeddirty = status.modified + status.added | 335 trackeddirty = status.modified + status.added |
330 clean = status.clean | 336 clean = status.clean |
331 if assumeclean: | 337 if assumeclean: |
332 clean.extend(lookup) | 338 clean.extend(lookup) |
333 else: | 339 else: |