Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 47602:8f0c3533e28c
revert: use `set_untracked` when performing a revert
This is the new shiny API.
Differential Revision: https://phab.mercurial-scm.org/D11022
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jul 2021 04:47:36 +0200 |
parents | 791e2333d3d3 |
children | 7c64688e554d |
comparison
equal
deleted
inserted
replaced
47601:4dca29b00405 | 47602:8f0c3533e28c |
---|---|
3547 try: | 3547 try: |
3548 rmdir = repo.ui.configbool(b'experimental', b'removeemptydirs') | 3548 rmdir = repo.ui.configbool(b'experimental', b'removeemptydirs') |
3549 repo.wvfs.unlinkpath(f, rmdir=rmdir) | 3549 repo.wvfs.unlinkpath(f, rmdir=rmdir) |
3550 except OSError: | 3550 except OSError: |
3551 pass | 3551 pass |
3552 repo.dirstate.remove(f) | 3552 repo.dirstate.set_untracked(f) |
3553 | 3553 |
3554 def prntstatusmsg(action, f): | 3554 def prntstatusmsg(action, f): |
3555 exact = names[f] | 3555 exact = names[f] |
3556 if repo.ui.verbose or not exact: | 3556 if repo.ui.verbose or not exact: |
3557 repo.ui.status(actions[action][1] % uipathfn(f)) | 3557 repo.ui.status(actions[action][1] % uipathfn(f)) |
3585 prntstatusmsg(b'remove', f) | 3585 prntstatusmsg(b'remove', f) |
3586 doremove(f) | 3586 doremove(f) |
3587 for f in actions[b'drop'][0]: | 3587 for f in actions[b'drop'][0]: |
3588 audit_path(f) | 3588 audit_path(f) |
3589 prntstatusmsg(b'drop', f) | 3589 prntstatusmsg(b'drop', f) |
3590 repo.dirstate.remove(f) | 3590 repo.dirstate.set_untracked(f) |
3591 | 3591 |
3592 normal = None | 3592 normal = None |
3593 if node == parent: | 3593 if node == parent: |
3594 # We're reverting to our parent. If possible, we'd like status | 3594 # We're reverting to our parent. If possible, we'd like status |
3595 # to report the file as clean. We have to use normallookup for | 3595 # to report the file as clean. We have to use normallookup for |