comparison mercurial/cmdutil.py @ 47732:dc610e325302

revert: use `set_possibly_dirty` instead of `normallookup` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11174
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 03:52:54 +0200
parents cc438f793b98
children 56297381af90
comparison
equal deleted inserted replaced
47731:485ae37a7ec5 47732:dc610e325302
3608 if node == parent: 3608 if node == parent:
3609 # We're reverting to our parent. If possible, we'd like status 3609 # We're reverting to our parent. If possible, we'd like status
3610 # to report the file as clean. We have to use normallookup for 3610 # to report the file as clean. We have to use normallookup for
3611 # merges to avoid losing information about merged/dirty files. 3611 # merges to avoid losing information about merged/dirty files.
3612 if p2 != repo.nullid: 3612 if p2 != repo.nullid:
3613 normal = repo.dirstate.normallookup 3613 normal = repo.dirstate.set_tracked
3614 else: 3614 else:
3615 normal = repo.dirstate.set_clean 3615 normal = repo.dirstate.set_clean
3616 3616
3617 newlyaddedandmodifiedfiles = set() 3617 newlyaddedandmodifiedfiles = set()
3618 if interactive: 3618 if interactive:
3701 if f not in newlyaddedandmodifiedfiles: 3701 if f not in newlyaddedandmodifiedfiles:
3702 prntstatusmsg(b'add', f) 3702 prntstatusmsg(b'add', f)
3703 checkout(f) 3703 checkout(f)
3704 repo.dirstate.set_tracked(f) 3704 repo.dirstate.set_tracked(f)
3705 3705
3706 normal = repo.dirstate.normallookup 3706 normal = repo.dirstate.set_tracked
3707 if node == parent and p2 == repo.nullid: 3707 if node == parent and p2 == repo.nullid:
3708 normal = repo.dirstate.set_clean 3708 normal = repo.dirstate.set_clean
3709 for f in actions[b'undelete'][0]: 3709 for f in actions[b'undelete'][0]:
3710 if interactive: 3710 if interactive:
3711 choice = repo.ui.promptchoice( 3711 choice = repo.ui.promptchoice(