-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
status: add fallback to slow crawl on watchman failure
Summary: The Python "status" code would fall back to non-Watchman status on a Watchman error by default. Previously I didn't reproduce this in the Rust status, hoping it wasn't necessary. However, various cases have popped up where Watchman can't be used in various environments for various reasons, so let's add the fallback to Rust as well. Note that some of the Watchman errors have been real bugs in Watchman (e.g. startup race condition in Windows), and potential "environment" bugs (e.g. Watchman simply not installed), but it does seem like we should err on the side of not blocking users with errors. I'm going to disable fsmonitor.fallback-on-watchman-exception for tests and local development so we don't hide new issues. Reviewed By: quark-zju Differential Revision: D51265962 fbshipit-source-id: d66dd47e83f4bd3811f04d237a75148030cc8526
- Loading branch information
1 parent
995db0d
commit 315f9e3
Showing
2 changed files
with
124 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#debugruntest-compatible | ||
#require fsmonitor | ||
|
||
$ configure modernclient | ||
$ newclientrepo | ||
$ echo foo > foo | ||
$ hg commit -Aqm foo | ||
|
||
$ echo nope > $TESTTMP/watchman | ||
$ chmod +x $TESTTMP/watchman | ||
$ export PATH=$TESTTMP:$PATH | ||
$ unset WATCHMAN_SOCK | ||
|
||
$ echo foo >> foo | ||
$ LOG=warn,watchman_info=debug hg st --config fsmonitor.fallback-on-watchman-exception=true | ||
DEBUG watchman_info: watchmanfallback=1 | ||
WARN workingcopy::watchmanfs::watchmanfs: watchman error - falling back to slow crawl * (glob) | ||
` (?) | ||
M foo | ||
|
||
$ LOG=warn,watchman_info=debug hg st --config fsmonitor.fallback-on-watchman-exception=false | ||
abort: While invoking the watchman CLI * (glob) | ||
` (?) | ||
[255] |