2015-10-16 12:45:27 +03:00
|
|
|
Test catnotate
|
|
|
|
|
|
|
|
$ hg init repo1
|
|
|
|
$ cd repo1
|
|
|
|
$ cat > .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
2017-06-19 18:02:38 +03:00
|
|
|
> catnotate=$TESTDIR/../hgext3rd/catnotate.py
|
2015-10-16 12:45:27 +03:00
|
|
|
> strip=
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ cat > a <<EOF
|
|
|
|
> Hell
|
|
|
|
> on
|
|
|
|
> world
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ cat > b <<EOF
|
|
|
|
> Hello
|
|
|
|
> world
|
|
|
|
> EOF
|
2016-06-10 23:37:24 +03:00
|
|
|
$ printf "\0\n" >> b
|
2015-10-16 12:45:27 +03:00
|
|
|
|
|
|
|
$ hg add a b
|
|
|
|
$ hg commit -m "Hello :)"
|
|
|
|
$ hg catnotate a b
|
|
|
|
a:1: Hell
|
|
|
|
a:2: on
|
|
|
|
a:3: world
|
|
|
|
a:4:
|
|
|
|
b: binary file
|
|
|
|
|
|
|
|
$ hg catnotate -a a b
|
|
|
|
a:1: Hell
|
|
|
|
a:2: on
|
|
|
|
a:3: world
|
|
|
|
a:4:
|
|
|
|
b:1: Hello
|
|
|
|
b:2: world
|
|
|
|
b:3: \x00 (esc)
|
|
|
|
b:4:
|
|
|
|
|
|
|
|
$ hg update 0
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg catnotate --rev . a
|
|
|
|
a:1: Hell
|
|
|
|
a:2: on
|
|
|
|
a:3: world
|
|
|
|
a:4:
|