mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
1dcb7966fc
Summary: These are the tests that passed after adding "$ eagerepo". I attempted to turn on eagerepo for all tests that didn't contain "$ eagerepo" or "configure modern". Reviewed By: quark-zju Differential Revision: D44445379 fbshipit-source-id: b283be6d5249f74e11a3205622961e457587e93b
89 lines
2.4 KiB
Perl
89 lines
2.4 KiB
Perl
#chg-compatible
|
|
#debugruntest-compatible
|
|
|
|
$ eagerepo
|
|
$ enable stat
|
|
|
|
Setup repo
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
|
|
Test template stat
|
|
|
|
$ hg log -r . -T '{stat()}'
|
|
|
|
$ seq 50 > a
|
|
$ hg add a
|
|
$ seq 26 75 > b
|
|
$ hg add b
|
|
$ hg commit -m "Added a and b with 50 lines each"
|
|
$ hg log -r . -T '{stat()}'
|
|
a | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
b | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2 files changed, 100 insertions(+), 0 deletions(-)
|
|
|
|
$ COLUMNS=20 hg log -r . -T '{stat()}'
|
|
a | 50 +++++++++++
|
|
b | 50 +++++++++++
|
|
2 files changed, 100 insertions(+), 0 deletions(-)
|
|
|
|
$ seq 50 > b
|
|
$ seq 26 75 > a
|
|
$ hg commit -m "Swapped the files"
|
|
$ hg log -r . -T '{stat()}'
|
|
a | 50 +++++++++++++++++++++++++-------------------------
|
|
b | 50 +++++++++++++++++++++++++-------------------------
|
|
2 files changed, 50 insertions(+), 50 deletions(-)
|
|
|
|
$ COLUMNS=20 hg log -r . -T '{stat()}'
|
|
a | 50 +++++-----
|
|
b | 50 +++++-----
|
|
2 files changed, 50 insertions(+), 50 deletions(-)
|
|
|
|
$ mkdir dir
|
|
$ seq 50 > dir/a
|
|
$ hg add dir/a
|
|
$ hg commit -m "Added file with 50 lines inside directory dir"
|
|
$ hg log -r . -T '{stat()}'
|
|
dir/a | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
1 files changed, 50 insertions(+), 0 deletions(-)
|
|
|
|
$ COLUMNS=20 hg log -r . -T '{stat()}'
|
|
dir/a | 50 ++++++++++
|
|
1 files changed, 50 insertions(+), 0 deletions(-)
|
|
|
|
$ seq 41 60 > dir/a
|
|
$ hg commit -m "Modified file inside directory dir"
|
|
$ hg log -r . -T '{stat()}'
|
|
dir/a | 50 ++++++++++----------------------------------------
|
|
1 files changed, 10 insertions(+), 40 deletions(-)
|
|
|
|
$ COLUMNS=20 hg log -r . -T '{stat()}'
|
|
dir/a | 50 ++--------
|
|
1 files changed, 10 insertions(+), 40 deletions(-)
|
|
|
|
$ $PYTHON << EOF
|
|
> with open('binary', 'wb') as f:
|
|
> f.write(b'\x00\x01\x02\x00' * 10)
|
|
> EOF
|
|
$ hg add binary
|
|
$ hg commit -m "Added binary file"
|
|
$ hg log -r . -T '{stat()}'
|
|
binary | Bin
|
|
1 files changed, 0 insertions(+), 0 deletions(-)
|
|
$ hg log -r . -T '{stat("status")}'
|
|
added binary | Bin
|
|
1 files changed, 0 insertions(+), 0 deletions(-)
|
|
|
|
$ hg rm -q binary a
|
|
$ echo 3 >> b
|
|
$ echo 4 >> c
|
|
$ hg add c
|
|
$ hg log -r 'wdir()' -T '{stat(status)}'
|
|
removed a | 50 --------------------------------------------------
|
|
changed b | 1 +
|
|
removed binary | Bin
|
|
added c | 1 +
|
|
4 files changed, 2 insertions(+), 50 deletions(-)
|