Show More
@@ -1,76 +1,80 b'' | |||
|
1 | 1 | test command parsing and dispatch |
|
2 | 2 | |
|
3 | 3 | $ hg init a |
|
4 | 4 | $ cd a |
|
5 | 5 | |
|
6 | 6 | Redundant options used to crash (issue436): |
|
7 | 7 | $ hg -v log -v |
|
8 | 8 | $ hg -v log -v x |
|
9 | 9 | |
|
10 | 10 | $ echo a > a |
|
11 | 11 | $ hg ci -Ama |
|
12 | 12 | adding a |
|
13 | 13 | |
|
14 | 14 | Missing arg: |
|
15 | 15 | |
|
16 | 16 | $ hg cat |
|
17 | 17 | hg cat: invalid arguments |
|
18 | 18 | hg cat [OPTION]... FILE... |
|
19 | 19 | |
|
20 | 20 | output the current or given revision of files |
|
21 | 21 | |
|
22 | 22 | options ([+] can be repeated): |
|
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 | (use 'hg cat -h' to show more help) |
|
31 | 31 | [255] |
|
32 | 32 | |
|
33 | 33 | [defaults] |
|
34 | 34 | |
|
35 | 35 | $ hg cat a |
|
36 | 36 | a |
|
37 | 37 | $ cat >> $HGRCPATH <<EOF |
|
38 | 38 | > [defaults] |
|
39 | 39 | > cat = -r null |
|
40 | 40 | > EOF |
|
41 | 41 | $ hg cat a |
|
42 | 42 | a: no such file in rev 000000000000 |
|
43 | 43 | [1] |
|
44 | 44 | |
|
45 | 45 | $ cd "$TESTTMP" |
|
46 | 46 | |
|
47 | 47 | OSError "No such file or directory" / "The system cannot find the path |
|
48 | 48 | specified" should include filename even when it is empty |
|
49 | 49 | |
|
50 | 50 | $ hg -R a archive '' |
|
51 | 51 | abort: *: '' (glob) |
|
52 | 52 | [255] |
|
53 | 53 | |
|
54 | 54 | #if no-outer-repo |
|
55 | 55 | |
|
56 | 56 | No repo: |
|
57 | 57 | |
|
58 | 58 | $ hg cat |
|
59 | 59 | abort: no repository found in '$TESTTMP' (.hg not found)! |
|
60 | 60 | [255] |
|
61 | 61 | |
|
62 | 62 | #endif |
|
63 | 63 | |
|
64 | 64 | #if rmcwd |
|
65 | 65 | |
|
66 | 66 | Current directory removed: |
|
67 | 67 | |
|
68 | 68 | $ mkdir $TESTTMP/repo1 |
|
69 | 69 | $ cd $TESTTMP/repo1 |
|
70 | 70 | $ rm -rf $TESTTMP/repo1 |
|
71 | $ HGDEMANDIMPORT=disable hg version -q | |
|
72 | abort: error getting current working directory: * (glob) (no-chg !) | |
|
73 |
|
|
|
74 | [255] | |
|
71 | ||
|
72 | The output could be one of the following and something else: | |
|
73 | chg: abort: failed to getcwd (errno = *) (glob) | |
|
74 | abort: error getting current working directory: * (glob) | |
|
75 | sh: 0: getcwd() failed: No such file or directory | |
|
76 | Since the exact behavior depends on the shell, only check it returns non-zero. | |
|
77 | $ HGDEMANDIMPORT=disable hg version -q 2>/dev/null || false | |
|
78 | [1] | |
|
75 | 79 | |
|
76 | 80 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now