sapling/eden/scm/tests/test-status-ignored.t
Muir Manders 5b042fa73f tests: fix test-status-ignored.t
Summary: There was the classic same second race condition that left files NEED_CHECK after commit, and the tracing message had changed.

Reviewed By: quark-zju

Differential Revision: D44442614

fbshipit-source-id: 97486163301045825922f9b68ec00ff12e5432a7
2023-03-27 19:03:49 -07:00

27 lines
760 B
Perl

#chg-compatible
#require fsmonitor
$ setconfig status.use-rust=true workingcopy.use-rust=true
$ configure modernclient
$ newclientrepo
$ echo foo > .gitignore
Avoid dirstate race condition where added files end up as NEED_CHECK.
$ sleep 1
$ hg commit -Aqm ignore
$ mkdir foo
$ touch foo/a foo/b foo/c
$ hg add -q foo/a foo/b foo/c
$ hg forget -q foo
We want the ignore files to be present in our treestate.
$ hg debugtree list
.gitignore: 0100644 4 + EXIST_P1 EXIST_NEXT
foo/a: 00 -1 -1 NEED_CHECK
foo/b: 00 -1 -1 NEED_CHECK
foo/c: 00 -1 -1 NEED_CHECK
We shouldn't need to check any files from treestate.
$ LOG=workingcopy::watchmanfs=debug hg status 2>&1 | grep treestate_needs_check
* treestate_needs_check=0 (glob)