sapling/tests/test-status-mlog.t
Jun Wu c754e0147b commands: provide in-core blackbox command
Summary:
The in-core blackbox command displays blackbox entries in the given time range.

The `blackbox` command provided by the blackbox extension was removed. They
can still be accessed via `.hg/blackbox.log`, though.

Tests are updated. Most `| grep` patterns were changed to use structured pattern
matching `--pattern` instead. Tests that are not interesting (ex. bundlebackup,
since we are moving away from bundle files slowly) are just removed.

Reviewed By: markbt

Differential Revision: D15640718

fbshipit-source-id: 7e5da60ca2b15ae9495d0242b340a066979d5a4f
2019-06-26 11:03:27 -07:00

30 lines
795 B
Perl

Test logging of "M" entries
$ newrepo
$ setconfig experimental.samplestatus=2 blackbox.track=status
$ echo 1 > a
$ hg commit -A a -m a
$ echo 2 >> a
$ hg status
M a
$ hg blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":"status"}}'
[legacy][status] M a: size changed (2 -> 4)
$ sleep 1
$ rm -rf a .hg/blackbox*
$ touch a
$ hg status
M a
$ hg blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":"status"}}'
[legacy][status] M a: size changed (2 -> 0), os.stat size = 0
$ sleep 1
$ rm -rf .hg/blackbox*
$ echo 1 > a
$ hg status
$ hg blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":"status"}}'
[legacy][status] L a: mtime changed (* -> *) (glob)
[legacy][status] C a: checked in filesystem