If a filesystem directory contains anything that is not:
- a "normal" file
- a symbolic link
- or a directory
… act as if that directory entry was not there. For example, if that path was
previously a tracked file, mark it as deleted or removed.
( )
If a filesystem directory contains anything that is not:
… act as if that directory entry was not there. For example, if that path was
previously a tracked file, mark it as deleted or removed.
No Linters Available |
No Unit Test Coverage |
If the non-file, non-symlink entry is exactly matched, it should be reported as a warning as a "bad" match
Yes, tests/test-symlinks.t covers this:
[…] $ mkfifo a.c $ hg status M dir/b.o ! a.c ! dir/a.o ? .hgignore $ hg status a.c a.c: unsupported file type (type is fifo) ! a.c
And it passes when I run it with --extra-config-opt experimental.dirstate-tree.in-memory=1. Maybe this is taken care of when constructing the matcher?
I find it weird because the only place I see bad being appended to is if DirEntry::read_dir returns an IoError, which should not happen in the test-case you're quoting. Or am I missing something?
This most likely isn't going through Rust for this case. This can be handled in a follow-up changeset.
Ah, I figured it out. The relevant command in the test creates a patternmatcher which is not in allowed_matchers, so dirstate.py falls back to Python status(), so the code in this patch does not end up being used.
… which is weird because I definitely remember this test failing with --extra-config-opt experimental.dirstate-tree.in-memory=1. Could the matcher type have changed between that and a rebase?
I don't think so, I haven't seen anything that touched code around matches since you started this work.