Mercurial > hg
comparison tests/test-subrepo.t @ 32584:746e12a767b3
cat: add formatter support
This is an example showing how formatter can handle the --output option.
git subrepo isn't supported for now.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 25 May 2017 21:53:44 +0900 |
parents | 3433bf56b768 |
children | bcb6684d144b |
comparison
equal
deleted
inserted
replaced
32583:7bfa1b199972 | 32584:746e12a767b3 |
---|---|
1018 $ hg ci -mtest | 1018 $ hg ci -mtest |
1019 committing subrepository sub/repo (glob) | 1019 committing subrepository sub/repo (glob) |
1020 $ hg cat sub/repo/foo | 1020 $ hg cat sub/repo/foo |
1021 test | 1021 test |
1022 test | 1022 test |
1023 $ hg cat sub/repo/foo -Tjson | |
1024 [ | |
1025 { | |
1026 "abspath": "foo", | |
1027 "data": "test\ntest\n", | |
1028 "path": "sub/repo/foo" (glob) | |
1029 } | |
1030 ] | |
1023 $ mkdir -p tmp/sub/repo | 1031 $ mkdir -p tmp/sub/repo |
1024 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo | 1032 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo |
1025 $ cat tmp/sub/repo/foo_p | 1033 $ cat tmp/sub/repo/foo_p |
1026 test | 1034 test |
1027 $ mv sub/repo sub_ | 1035 $ mv sub/repo sub_ |