sapling/tests/test-fsmonitor-blackbox.t
Mark Thomas 94257a258b blackbox: clean up blackbox logging and log more during rage
Summary:
Clean up some of the calls to `ui.log` and how they appear in blackbox logging.

* Make the names of the events consistently use `snake_case`.
* For watchman, only log once for each watchman command.  Include whether or not it failed.
* Unify `fsmonitor` logging under the `fsmonitor` event.
* Omit the second argument when it is empty - it is optional and does nothing when empty.
* Increase the number of blackbox lines included in rage to 100.

Reviewed By: quark-zju

Differential Revision: D14949868

fbshipit-source-id: a9aa8251e71ae7ca556c08116f8f7c61ff472218
2019-04-23 02:48:50 -07:00

45 lines
701 B
Perl

#require fsmonitor
$ newrepo
$ enable blackbox
$ setconfig blackbox.track=fsmonitor
$ hg status
$ touch x
$ hg status
? x
$ touch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
$ hg status
? 1
? 10
? 11
? 12
? 13
? 14
? 15
? 16
? 17
? 18
? 19
? 2
? 20
? 21
? 22
? 23
? 24
? 25
? 3
? 4
? 5
? 6
? 7
? 8
? 9
? x
$ grep returned .hg/blackbox.log
*> watchman returned ['x'] (glob)
*> watchman returned [*] and 5 more entries (glob)
$ grep 'set clock' .hg/blackbox.log
*> set clock='*' notefiles=[] (glob)
*> set clock='*' notefiles=['x'] (glob)
*> set clock='*' notefiles=[*] and 6 more entries (glob)