Commit Graph

2 Commits

Author SHA1 Message Date
Jun Wu
fcf535a3e5 fsmonitor: do not set watchman clock to None
Summary:
There are some code paths (ex. "purge --all") that sets watchman clock to None
unexpectedly. That makes the next command slow. Bypass it by detecting the case
and avoid setting clock to None.

Reviewed By: DurhamG

Differential Revision: D10188143

fbshipit-source-id: 4c35dfcee658ca2075d686da7d886e4b3a352b5a
2018-10-12 19:23:01 -07:00
Jun Wu
3f866b49cf tests: add a test demonstrating watchman clock gets reset after purge --all
Summary:
With treestate, watchman clock is not expected to be reset. But `purge --all`
bypasses some fsmonitor code paths and manages to reset the clock. Add a test
to show that.

Reviewed By: DurhamG

Differential Revision: D10188142

fbshipit-source-id: 4524979fb96d41fab881b7ee44ad9fa854081b26
2018-10-12 19:23:01 -07:00