Mark missing files as '?', not '!' Files that were deleted with `rm` instead of `hg rm` have status 'deleted' instead of 'removed'. Previously, deleted files were treated the same as removed files, and caused the status/dirtiness marker to include '!'. After this commit, deleted files are treated the same as unknown files, and cause the dirtiness marker to include '?'. Motivation: both 'deleted' and 'unknown' indicate working-directory-only changes that will not be committed.
1 files changed, 4 insertions(+), 2 deletions(-) M prompt.py
M prompt.py +4 -2
@@ 283,8 283,10 @@ def prompt(ui, repo, fs='', **opts): g = m.groups() st = repo.status(unknown=True) - modified = any((st.modified, st.added, st.removed, st.deleted)) - unknown = len(st.unknown) > 0 + # Deleted files are like unknown files: the removal happened in the + # working directory, but won't be committed unless `hg rm` is used. + modified = any((st.modified, st.added, st.removed)) + unknown = any((st.unknown, st.deleted)) flag = '' if '|modified' not in g and '|unknown' not in g: