##// 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 1 #!/bin/sh
2 2 # test command parsing and dispatch
3 3
4 4 "$TESTDIR/hghave" no-outer-repo || exit 80
5 5
6 6 dir=`pwd`
7 7
8 8 hg init a
9 9 cd a
10 10 echo a > a
11 11 hg ci -Ama
12 12
13 13 echo "# missing arg"
14 14 hg cat
15 15
16 16 echo '% [defaults]'
17 17 hg cat a
18 18 cat >> $HGRCPATH <<EOF
19 19 [defaults]
20 20 cat = -r null
21 21 EOF
22 22 hg cat a
23 23
24 24 echo '% working directory removed'
25 rm -rf $dir/a
26 hg --version
25 sh -c "cd $dir && rm -rf a"
26 hg --version 2>&1 | sed -e 's,\(abort:.*:\).*$,\1 ...,g'
27 27
28 28 echo '% no repo'
29 29 cd $dir
30 30 hg cat
31 31
32 32 exit 0
33 33
@@ -1,39 +1,39 b''
1 1 adding a
2 2 # missing arg
3 3 hg cat: invalid arguments
4 4 hg cat [OPTION]... FILE...
5 5
6 6 output the current or given revision of files
7 7
8 8 Print the specified files as they were at the given revision. If no
9 9 revision is given, the parent of the working directory is used, or tip if
10 10 no revision is checked out.
11 11
12 12 Output may be to a file, in which case the name of the file is given using
13 13 a format string. The formatting rules are the same as for the export
14 14 command, with the following additions:
15 15
16 16 "%s" basename of file being printed
17 17 "%d" dirname of file being printed, or '.' if in repository root
18 18 "%p" root-relative path name of file being printed
19 19
20 20 Returns 0 on success.
21 21
22 22 options:
23 23
24 24 -o --output FORMAT print output to file with formatted name
25 25 -r --rev REV print the given revision
26 26 --decode apply any matching decode filter
27 27 -I --include PATTERN [+] include names matching the given patterns
28 28 -X --exclude PATTERN [+] exclude names matching the given patterns
29 29
30 30 [+] marked option can be specified multiple times
31 31
32 32 use "hg -v help cat" to show global options
33 33 % [defaults]
34 34 a
35 35 a: No such file in rev 000000000000
36 36 % working directory removed
37 abort: error getting current working directory: No such file or directory
37 abort: error getting current working directory: ...
38 38 % no repo
39 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