sapling/tests/test-treestate-trackignore.t
Jun Wu f556edd8a4 fsmonitor: add migration to toggle tracking ignored files
Summary:
It turns out tracking ignored files does have an impact on status performance.
Filtering out the ignored directories is not that fast, and ignored files can
be scattered everywhere (like ".pyc", ".iml" files) that makes them harder to
be filtered out efficiently.

Add code paths to migrate between "ignored tracked" and "ignore untracked".
Store the metadata in treestate.

Reviewed By: phillco

Differential Revision: D12916021

fbshipit-source-id: e02d0c6f3b1a036f70703c11f35381c594e2f8e5
2018-11-03 11:12:56 -07:00

28 lines
676 B
Perl

#require fsmonitor
$ newrepo
$ cat >> .gitignore << EOF
> .gitignore
> EOF
$ hg status
$ hg debugtree list
.gitignore: 0666 -1 -1 NEED_CHECK
Stop tracking ignored files removes them from treestate. The migration only happens once.
$ setconfig fsmonitor.track-ignore-files=0
$ hg status --debug | grep tracking
stop tracking ignored files
$ hg status
$ hg debugtree list
Start tracking ignored files adds them to treestate. The migration only happens once.
$ setconfig fsmonitor.track-ignore-files=1
$ hg status --debug | grep tracking
start tracking 1 ignored files
$ hg status
$ hg debugtree list
.gitignore: 0666 -1 -1 NEED_CHECK