comparison mercurial/cmdutil.py @ 47707:61753b1ba96f

revert: use `set_clean` instead of `normal` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11149
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 03:52:20 +0200
parents 3c0efa0eeea6
children 4d1ae9cba551
comparison
equal deleted inserted replaced
47706:5bbf304271a0 47707:61753b1ba96f
3596 # to report the file as clean. We have to use normallookup for 3596 # to report the file as clean. We have to use normallookup for
3597 # merges to avoid losing information about merged/dirty files. 3597 # merges to avoid losing information about merged/dirty files.
3598 if p2 != repo.nullid: 3598 if p2 != repo.nullid:
3599 normal = repo.dirstate.normallookup 3599 normal = repo.dirstate.normallookup
3600 else: 3600 else:
3601 normal = repo.dirstate.normal 3601 normal = repo.dirstate.set_clean
3602 3602
3603 newlyaddedandmodifiedfiles = set() 3603 newlyaddedandmodifiedfiles = set()
3604 if interactive: 3604 if interactive:
3605 # Prompt the user for changes to revert 3605 # Prompt the user for changes to revert
3606 torevert = [f for f in actions[b'revert'][0] if f not in excluded_files] 3606 torevert = [f for f in actions[b'revert'][0] if f not in excluded_files]
3689 checkout(f) 3689 checkout(f)
3690 repo.dirstate.set_tracked(f) 3690 repo.dirstate.set_tracked(f)
3691 3691
3692 normal = repo.dirstate.normallookup 3692 normal = repo.dirstate.normallookup
3693 if node == parent and p2 == repo.nullid: 3693 if node == parent and p2 == repo.nullid:
3694 normal = repo.dirstate.normal 3694 normal = repo.dirstate.set_clean
3695 for f in actions[b'undelete'][0]: 3695 for f in actions[b'undelete'][0]:
3696 if interactive: 3696 if interactive:
3697 choice = repo.ui.promptchoice( 3697 choice = repo.ui.promptchoice(
3698 _(b"add back removed file %s (Yn)?$$ &Yes $$ &No") % f 3698 _(b"add back removed file %s (Yn)?$$ &Yes $$ &No") % f
3699 ) 3699 )