sapling/tests/test-purge-fsmonitor.t
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

20 lines
341 B
Raku

#require fsmonitor
$ newrepo
$ enable purge
$ touch x
Watchman clock is set after "status"
$ hg status
? x
$ hg debugshell -c 'print(repo.dirstate.getclock())'
c:* (glob)
Watchman clock is not reset after a "purge --all"
$ hg purge --all
$ hg debugshell -c 'print(repo.dirstate.getclock())'
c:* (glob)
$ hg status