comparison mercurial/strip.py @ 48096:97c5d1c22489

dirstate-item: use `maybe_clean` instead of `state` in `strip` Differential Revision: https://phab.mercurial-scm.org/D11533
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 29 Sep 2021 15:23:57 +0200
parents d55b71393907
children 5ced12cfa41b
comparison
equal deleted inserted replaced
48095:20d0149b8a0a 48096:97c5d1c22489
253 # blindly reset the files, regardless of what actually changed 253 # blindly reset the files, regardless of what actually changed
254 changedfiles.extend(repo[rev].files()) 254 changedfiles.extend(repo[rev].files())
255 255
256 # reset files that only changed in the dirstate too 256 # reset files that only changed in the dirstate too
257 dirstate = repo.dirstate 257 dirstate = repo.dirstate
258 dirchanges = [f for f in dirstate if dirstate[f] != b'n'] 258 dirchanges = [
259 f for f in dirstate if not dirstate.get_entry(f).maybe_clean
260 ]
259 changedfiles.extend(dirchanges) 261 changedfiles.extend(dirchanges)
260 262
261 repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles) 263 repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles)
262 repo.dirstate.write(repo.currenttransaction()) 264 repo.dirstate.write(repo.currenttransaction())
263 265