Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHGdcec16e799dd: status: fix hg status race against file deletion
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- stable
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Comment Actions
This is a bug that leads to hg status wrongly saying that the whole directory is deleted even though only some of the files in it was deleted (potentially one of the ignored files, in which case the status could even be clean).
I tested it using the following command:
(mkdir r; cd r; hg init; echo 'd/x*' > .hgignore; mkdir d; touch d/x{1..10000}; hg status --config 'extensions.sparse=!' & rm d/*; wait; cd ..; rm -r r)
Without this patch, this prints "d: No such file or directory". With this patch it does not.
Comment Actions
The condition to skip just the ENOENT errors is equivalent to the one in osutil.c (line 393). Unfortunately, I believe the pure code is still buggy: there's still the same bug at mercurial/pure/osutil.py line 62.