##// END OF EJS Templates
test-dispatch: Make test of removed working directory work on AIX (issue2315)...
Mads Kiilerich -
r11772:423ece53 stable
parent child Browse files
Show More
@@ -1,33 +1,33 b''
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 dir=`pwd`
6 dir=`pwd`
7
7
8 hg init a
8 hg init a
9 cd a
9 cd a
10 echo a > a
10 echo a > a
11 hg ci -Ama
11 hg ci -Ama
12
12
13 echo "# missing arg"
13 echo "# missing arg"
14 hg cat
14 hg cat
15
15
16 echo '% [defaults]'
16 echo '% [defaults]'
17 hg cat a
17 hg cat a
18 cat >> $HGRCPATH <<EOF
18 cat >> $HGRCPATH <<EOF
19 [defaults]
19 [defaults]
20 cat = -r null
20 cat = -r null
21 EOF
21 EOF
22 hg cat a
22 hg cat a
23
23
24 echo '% working directory removed'
24 echo '% working directory removed'
25 rm -rf $dir/a
25 sh -c "cd $dir && rm -rf a"
26 hg --version
26 hg --version 2>&1 | sed -e 's,\(abort:.*:\).*$,\1 ...,g'
27
27
28 echo '% no repo'
28 echo '% no repo'
29 cd $dir
29 cd $dir
30 hg cat
30 hg cat
31
31
32 exit 0
32 exit 0
33
33
@@ -1,39 +1,39 b''
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 no
8 Print the specified files as they were at the given revision. If no
9 revision is given, the parent of the working directory is used, or tip if
9 revision is given, the parent of the working directory is used, or tip if
10 no revision is checked out.
10 no revision is checked out.
11
11
12 Output may be to a file, in which case the name of the file is given using
12 Output may be to a file, in which case the name of the file is given using
13 a format string. The formatting rules are the same as for the export
13 a format string. The formatting rules are the same as for the export
14 command, with the following additions:
14 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 Returns 0 on success.
20 Returns 0 on success.
21
21
22 options:
22 options:
23
23
24 -o --output FORMAT print output to file with formatted name
24 -o --output FORMAT print output to file with formatted name
25 -r --rev REV print the given revision
25 -r --rev REV print the given revision
26 --decode apply any matching decode filter
26 --decode apply any matching decode filter
27 -I --include PATTERN [+] include names matching the given patterns
27 -I --include PATTERN [+] include names matching the given patterns
28 -X --exclude PATTERN [+] exclude names matching the given patterns
28 -X --exclude PATTERN [+] exclude names matching the given patterns
29
29
30 [+] marked option can be specified multiple times
30 [+] marked option can be specified multiple times
31
31
32 use "hg -v help cat" to show global options
32 use "hg -v help cat" to show global options
33 % [defaults]
33 % [defaults]
34 a
34 a
35 a: No such file in rev 000000000000
35 a: No such file in rev 000000000000
36 % working directory removed
36 % working directory removed
37 abort: error getting current working directory: No such file or directory
37 abort: error getting current working directory: ...
38 % no repo
38 % no repo
39 abort: There is no Mercurial repository here (.hg not found)!
39 abort: There is no Mercurial repository here (.hg not found)!
General Comments 0
You need to be logged in to leave comments. Login now