Show More
@@ -1,89 +1,170 b'' | |||||
1 | #!/bin/sh |
|
1 | $ cat >> $HGRCPATH <<EOF | |
|
2 | > [alias] | |||
|
3 | > myinit = init | |||
|
4 | > cleanstatus = status -c | |||
|
5 | > unknown = bargle | |||
|
6 | > ambiguous = s | |||
|
7 | > recursive = recursive | |||
|
8 | > nodefinition = | |||
|
9 | > no--cwd = status --cwd elsewhere | |||
|
10 | > no-R = status -R elsewhere | |||
|
11 | > no--repo = status --repo elsewhere | |||
|
12 | > no--repository = status --repository elsewhere | |||
|
13 | > mylog = log | |||
|
14 | > lognull = log -r null | |||
|
15 | > shortlog = log --template '{rev} {node|short} | {date|isodate}\n' | |||
|
16 | > dln = lognull --debug | |||
|
17 | > nousage = rollback | |||
|
18 | > put = export -r 0 -o "\$FOO/%R.diff" | |||
|
19 | > echo = !echo | |||
|
20 | > rt = root | |||
|
21 | > | |||
|
22 | > [defaults] | |||
|
23 | > mylog = -q | |||
|
24 | > lognull = -q | |||
|
25 | > log = -v | |||
|
26 | > EOF | |||
|
27 | ||||
|
28 | ||||
|
29 | basic | |||
|
30 | ||||
|
31 | $ hg myinit alias | |||
|
32 | ||||
|
33 | ||||
|
34 | unknown | |||
|
35 | ||||
|
36 | $ hg unknown | |||
|
37 | alias 'unknown' resolves to unknown command 'bargle' | |||
|
38 | $ hg help unknown | |||
|
39 | alias 'unknown' resolves to unknown command 'bargle' | |||
|
40 | ||||
2 |
|
41 | |||
3 | cat >> $HGRCPATH <<EOF |
|
42 | ambiguous | |
4 | [alias] |
|
43 | ||
5 | myinit = init |
|
44 | $ hg ambiguous | |
6 | cleanstatus = status -c |
|
45 | alias 'ambiguous' resolves to ambiguous command 's' | |
7 | unknown = bargle |
|
46 | $ hg help ambiguous | |
8 | ambiguous = s |
|
47 | alias 'ambiguous' resolves to ambiguous command 's' | |
9 | recursive = recursive |
|
48 | ||
10 | nodefinition = |
|
49 | ||
11 | no--cwd = status --cwd elsewhere |
|
50 | recursive | |
12 | no-R = status -R elsewhere |
|
51 | ||
13 | no--repo = status --repo elsewhere |
|
52 | $ hg recursive | |
14 | no--repository = status --repository elsewhere |
|
53 | alias 'recursive' resolves to unknown command 'recursive' | |
15 | mylog = log |
|
54 | $ hg help recursive | |
16 | lognull = log -r null |
|
55 | alias 'recursive' resolves to unknown command 'recursive' | |
17 | shortlog = log --template '{rev} {node|short} | {date|isodate}\n' |
|
56 | ||
18 | dln = lognull --debug |
|
57 | ||
19 | nousage = rollback |
|
58 | no definition | |
20 | put = export -r 0 -o "\$FOO/%R.diff" |
|
|||
21 | echo = !echo |
|
|||
22 | rt = root |
|
|||
23 |
|
59 | |||
24 | [defaults] |
|
60 | $ hg nodef | |
25 | mylog = -q |
|
61 | no definition for alias 'nodefinition' | |
26 | lognull = -q |
|
62 | $ hg help nodef | |
27 | log = -v |
|
63 | no definition for alias 'nodefinition' | |
28 | EOF |
|
|||
29 |
|
64 | |||
30 | echo '% basic' |
|
65 | ||
31 | hg myinit alias |
|
66 | invalid options | |
32 |
|
67 | |||
33 | echo '% unknown' |
|
68 | $ hg no--cwd | |
34 | hg unknown |
|
69 | error in definition for alias 'no--cwd': --cwd may only be given on the command line | |
35 |
hg help |
|
70 | $ hg help no--cwd | |
36 |
|
71 | error in definition for alias 'no--cwd': --cwd may only be given on the command line | ||
37 | echo '% ambiguous' |
|
72 | $ hg no-R | |
38 | hg ambiguous |
|
73 | error in definition for alias 'no-R': -R may only be given on the command line | |
39 | hg help ambiguous |
|
74 | $ hg help no-R | |
40 |
|
75 | error in definition for alias 'no-R': -R may only be given on the command line | ||
41 | echo '% recursive' |
|
76 | $ hg no--repo | |
42 | hg recursive |
|
77 | error in definition for alias 'no--repo': --repo may only be given on the command line | |
43 | hg help recursive |
|
78 | $ hg help no--repo | |
|
79 | error in definition for alias 'no--repo': --repo may only be given on the command line | |||
|
80 | $ hg no--repository | |||
|
81 | error in definition for alias 'no--repository': --repository may only be given on the command line | |||
|
82 | $ hg help no--repository | |||
|
83 | error in definition for alias 'no--repository': --repository may only be given on the command line | |||
44 |
|
84 | |||
45 | echo '% no definition' |
|
85 | $ cd alias | |
46 | hg nodef |
|
86 | ||
47 | hg help nodef |
|
87 | ||
|
88 | no usage | |||
|
89 | ||||
|
90 | $ hg nousage | |||
|
91 | no rollback information available | |||
|
92 | ||||
|
93 | $ echo foo > foo | |||
|
94 | $ hg ci -Amfoo | |||
|
95 | adding foo | |||
|
96 | ||||
|
97 | ||||
|
98 | with opts | |||
48 |
|
99 | |||
49 | echo '% invalid options' |
|
100 | $ hg cleanst | |
50 | hg no--cwd |
|
101 | C foo | |
51 | hg help no--cwd |
|
102 | ||
52 | hg no-R |
|
103 | ||
53 | hg help no-R |
|
104 | with opts and whitespace | |
54 | hg no--repo |
|
105 | ||
55 | hg help no--repo |
|
106 | $ hg shortlog | |
56 | hg no--repository |
|
107 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 | |
57 | hg help no--repository |
|
108 | ||
58 |
|
109 | |||
59 | cd alias |
|
110 | interaction with defaults | |
60 |
|
111 | |||
61 | echo '% no usage' |
|
112 | $ hg mylog | |
62 | hg nousage |
|
113 | 0:e63c23eaa88a | |
|
114 | $ hg lognull | |||
|
115 | -1:000000000000 | |||
63 |
|
116 | |||
64 | echo foo > foo |
|
117 | ||
65 | hg ci -Amfoo |
|
118 | properly recursive | |
66 |
|
119 | |||
67 | echo '% with opts' |
|
120 | $ hg dln | |
68 | hg cleanst |
|
121 | changeset: -1:0000000000000000000000000000000000000000 | |
|
122 | parent: -1:0000000000000000000000000000000000000000 | |||
|
123 | parent: -1:0000000000000000000000000000000000000000 | |||
|
124 | manifest: -1:0000000000000000000000000000000000000000 | |||
|
125 | user: | |||
|
126 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
127 | extra: branch=default | |||
|
128 | ||||
69 |
|
129 | |||
70 | echo '% with opts and whitespace' |
|
|||
71 | hg shortlog |
|
|||
72 |
|
130 | |||
73 | echo '% interaction with defaults' |
|
131 | path expanding | |
74 | hg mylog |
|
|||
75 | hg lognull |
|
|||
76 |
|
132 | |||
77 | echo '% properly recursive' |
|
133 | $ FOO=`pwd` hg put | |
78 | hg dln |
|
134 | $ cat 0.diff | |
|
135 | # HG changeset patch | |||
|
136 | # User test | |||
|
137 | # Date 0 0 | |||
|
138 | # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 | |||
|
139 | # Parent 0000000000000000000000000000000000000000 | |||
|
140 | foo | |||
|
141 | ||||
|
142 | diff -r 000000000000 -r e63c23eaa88a foo | |||
|
143 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
144 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |||
|
145 | @@ -0,0 +1,1 @@ | |||
|
146 | +foo | |||
79 |
|
147 | |||
80 | echo '% path expanding' |
|
148 | ||
81 | FOO=`pwd` hg put |
|
149 | shell aliases | |
82 | cat 0.diff |
|
|||
83 |
|
150 | |||
84 | echo '% shell aliases' |
|
151 | $ hg echo foo | |
85 |
|
|
152 | foo | |
86 | echo '% invalid arguments' |
|
153 | ||
87 | hg rt foo |
|
154 | invalid arguments | |
88 |
|
155 | |||
89 | exit 0 |
|
156 | $ hg rt foo | |
|
157 | hg rt: invalid arguments | |||
|
158 | hg rt | |||
|
159 | ||||
|
160 | alias for: hg root | |||
|
161 | ||||
|
162 | print the root (top) of the current working directory | |||
|
163 | ||||
|
164 | Print the root directory of the current repository. | |||
|
165 | ||||
|
166 | Returns 0 on success. | |||
|
167 | ||||
|
168 | use "hg -v help rt" to show global options | |||
|
169 | ||||
|
170 | $ exit 0 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now