Mercurial > public > mercurial-scm > hg-stable
diff tests/test-annotate.t @ 24421:77881cade20e
annotate: add option to annotate working-directory files
Working revision or node is displayed with "+" suffix in plain output, but
null/None in machine-readable format.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Aug 2014 17:50:55 +0900 |
parents | 28a302e9225d |
children | ab3a8ed7cf1d |
line wrap: on
line diff
--- a/tests/test-annotate.t Thu Mar 19 23:31:53 2015 +0900 +++ b/tests/test-annotate.t Sat Aug 16 17:50:55 2014 +0900 @@ -398,6 +398,76 @@ 20: 4 baz:4 16: 5 +annotate clean file + + $ hg annotate -ncr "wdir()" foo + 11 472b18db256d : foo + +annotate modified file + + $ echo foofoo >> foo + $ hg annotate -r "wdir()" foo + 11 : foo + 20+: foofoo + + $ hg annotate -cr "wdir()" foo + 472b18db256d : foo + b6bedd5477e7+: foofoo + + $ hg annotate -ncr "wdir()" foo + 11 472b18db256d : foo + 20 b6bedd5477e7+: foofoo + + $ hg annotate --debug -ncr "wdir()" foo + 11 472b18db256d1e8282064eab4bfdaf48cbfe83cd : foo + 20 b6bedd5477e797f25e568a6402d4697f3f895a72+: foofoo + + $ hg annotate -udr "wdir()" foo + test Thu Jan 01 00:00:00 1970 +0000: foo + test [A-Za-z0-9:+ ]+: foofoo (re) + + $ hg annotate -ncr "wdir()" -Tjson foo + [ + { + "line": "foo\n", + "node": "472b18db256d1e8282064eab4bfdaf48cbfe83cd", + "rev": 11 + }, + { + "line": "foofoo\n", + "node": null, + "rev": null + } + ] + +annotate added file + + $ echo bar > bar + $ hg add bar + $ hg annotate -ncr "wdir()" bar + 20 b6bedd5477e7+: bar + +annotate renamed file + + $ hg rename foo renamefoo2 + $ hg annotate -ncr "wdir()" renamefoo2 + 11 472b18db256d : foo + 20 b6bedd5477e7+: foofoo + +annotate missing file + + $ rm baz + $ hg annotate -ncr "wdir()" baz + abort: No such file or directory: $TESTTMP/repo/baz + [255] + +annotate removed file + + $ hg rm baz + $ hg annotate -ncr "wdir()" baz + abort: No such file or directory: $TESTTMP/repo/baz + [255] + Test annotate with whitespace options $ cd ..