Show More
@@ -1,27 +1,27 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # test command parsing and dispatch |
|
2 | # test command parsing and dispatch | |
3 |
|
3 | |||
4 | "$TESTDIR/hghave" no-outer-repo || exit 80 |
|
4 | "$TESTDIR/hghave" no-outer-repo || exit 80 | |
5 |
|
5 | |||
6 | hg init a |
|
6 | hg init a | |
7 | cd a |
|
7 | cd a | |
8 | echo a > a |
|
8 | echo a > a | |
9 | hg ci -Ama |
|
9 | hg ci -Ama | |
10 |
|
10 | |||
11 | echo "# missing arg" |
|
11 | echo "# missing arg" | |
12 | hg cat |
|
12 | hg cat | |
13 |
|
13 | |||
14 | echo '% [defaults]' |
|
14 | echo '% [defaults]' | |
15 | hg cat a |
|
15 | hg cat a | |
16 | cat >> $HGRCPATH <<EOF |
|
16 | cat >> $HGRCPATH <<EOF | |
17 | [defaults] |
|
17 | [defaults] | |
18 |
cat = - |
|
18 | cat = -r null | |
19 | EOF |
|
19 | EOF | |
20 | hg cat a |
|
20 | hg cat a | |
21 |
|
21 | |||
22 | echo '% no repo' |
|
22 | echo '% no repo' | |
23 | cd .. |
|
23 | cd .. | |
24 | hg cat |
|
24 | hg cat | |
25 |
|
25 | |||
26 | exit 0 |
|
26 | exit 0 | |
27 |
|
27 |
@@ -1,33 +1,33 | |||||
1 | adding a |
|
1 | adding a | |
2 | # missing arg |
|
2 | # missing arg | |
3 | hg cat: invalid arguments |
|
3 | hg cat: invalid arguments | |
4 | hg cat [OPTION]... FILE... |
|
4 | hg cat [OPTION]... FILE... | |
5 |
|
5 | |||
6 | output the current or given revision of files |
|
6 | output the current or given revision of files | |
7 |
|
7 | |||
8 | Print the specified files as they were at the given revision. If |
|
8 | Print the specified files as they were at the given revision. If | |
9 | no revision is given, the parent of the working directory is used, |
|
9 | no revision is given, the parent of the working directory is used, | |
10 | or tip if no revision is checked out. |
|
10 | or tip if no revision is checked out. | |
11 |
|
11 | |||
12 | Output may be to a file, in which case the name of the file is |
|
12 | Output may be to a file, in which case the name of the file is | |
13 | given using a format string. The formatting rules are the same as |
|
13 | given using a format string. The formatting rules are the same as | |
14 | for the export command, with the following additions: |
|
14 | for the export command, with the following additions: | |
15 |
|
15 | |||
16 | %s basename of file being printed |
|
16 | %s basename of file being printed | |
17 | %d dirname of file being printed, or '.' if in repository root |
|
17 | %d dirname of file being printed, or '.' if in repository root | |
18 | %p root-relative path name of file being printed |
|
18 | %p root-relative path name of file being printed | |
19 |
|
19 | |||
20 | options: |
|
20 | options: | |
21 |
|
21 | |||
22 | -o --output print output to file with formatted name |
|
22 | -o --output print output to file with formatted name | |
23 | -r --rev print the given revision |
|
23 | -r --rev print the given revision | |
24 | --decode apply any matching decode filter |
|
24 | --decode apply any matching decode filter | |
25 | -I --include include names matching the given patterns |
|
25 | -I --include include names matching the given patterns | |
26 | -X --exclude exclude names matching the given patterns |
|
26 | -X --exclude exclude names matching the given patterns | |
27 |
|
27 | |||
28 | use "hg -v help cat" to show global options |
|
28 | use "hg -v help cat" to show global options | |
29 | % [defaults] |
|
29 | % [defaults] | |
30 | a |
|
30 | a | |
31 | a |
|
31 | a: No such file in rev 000000000000 | |
32 | % no repo |
|
32 | % no repo | |
33 | abort: There is no Mercurial repository here (.hg not found)! |
|
33 | abort: There is no Mercurial repository here (.hg not found)! |
General Comments 0
You need to be logged in to leave comments.
Login now