##// END OF EJS Templates
alias: add test for alias command provided by disabled extension...
Yuya Nishihara -
r22159:db792181 default
parent child Browse files
Show More
@@ -1,495 +1,515
1 $ HGFOO=BAR; export HGFOO
1 $ HGFOO=BAR; export HGFOO
2 $ cat >> $HGRCPATH <<EOF
2 $ cat >> $HGRCPATH <<EOF
3 > [alias]
3 > [alias]
4 > # should clobber ci but not commit (issue2993)
4 > # should clobber ci but not commit (issue2993)
5 > ci = version
5 > ci = version
6 > myinit = init
6 > myinit = init
7 > mycommit = commit
7 > mycommit = commit
8 > optionalrepo = showconfig alias.myinit
8 > optionalrepo = showconfig alias.myinit
9 > cleanstatus = status -c
9 > cleanstatus = status -c
10 > unknown = bargle
10 > unknown = bargle
11 > ambiguous = s
11 > ambiguous = s
12 > recursive = recursive
12 > recursive = recursive
13 > disabled = email
13 > nodefinition =
14 > nodefinition =
14 > noclosingquotation = '
15 > noclosingquotation = '
15 > no--cwd = status --cwd elsewhere
16 > no--cwd = status --cwd elsewhere
16 > no-R = status -R elsewhere
17 > no-R = status -R elsewhere
17 > no--repo = status --repo elsewhere
18 > no--repo = status --repo elsewhere
18 > no--repository = status --repository elsewhere
19 > no--repository = status --repository elsewhere
19 > no--config = status --config a.config=1
20 > no--config = status --config a.config=1
20 > mylog = log
21 > mylog = log
21 > lognull = log -r null
22 > lognull = log -r null
22 > shortlog = log --template '{rev} {node|short} | {date|isodate}\n'
23 > shortlog = log --template '{rev} {node|short} | {date|isodate}\n'
23 > positional = log --template '{\$2} {\$1} | {date|isodate}\n'
24 > positional = log --template '{\$2} {\$1} | {date|isodate}\n'
24 > dln = lognull --debug
25 > dln = lognull --debug
25 > nousage = rollback
26 > nousage = rollback
26 > put = export -r 0 -o "\$FOO/%R.diff"
27 > put = export -r 0 -o "\$FOO/%R.diff"
27 > blank = !printf '\n'
28 > blank = !printf '\n'
28 > self = !printf '\$0\n'
29 > self = !printf '\$0\n'
29 > echoall = !printf '\$@\n'
30 > echoall = !printf '\$@\n'
30 > echo1 = !printf '\$1\n'
31 > echo1 = !printf '\$1\n'
31 > echo2 = !printf '\$2\n'
32 > echo2 = !printf '\$2\n'
32 > echo13 = !printf '\$1 \$3\n'
33 > echo13 = !printf '\$1 \$3\n'
33 > echotokens = !printf "%s\n" "\$@"
34 > echotokens = !printf "%s\n" "\$@"
34 > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g'
35 > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g'
35 > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g'
36 > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g'
36 > rt = root
37 > rt = root
37 > tglog = log -G --template "{rev}:{node|short}: '{desc}' {branches}\n"
38 > tglog = log -G --template "{rev}:{node|short}: '{desc}' {branches}\n"
38 > idalias = id
39 > idalias = id
39 > idaliaslong = id
40 > idaliaslong = id
40 > idaliasshell = !echo test
41 > idaliasshell = !echo test
41 > parentsshell1 = !echo one
42 > parentsshell1 = !echo one
42 > parentsshell2 = !echo two
43 > parentsshell2 = !echo two
43 > escaped1 = !printf 'test\$\$test\n'
44 > escaped1 = !printf 'test\$\$test\n'
44 > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"'
45 > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"'
45 > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"'
46 > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"'
46 > escaped4 = !printf '\$\$0 \$\$@\n'
47 > escaped4 = !printf '\$\$0 \$\$@\n'
47 > exit1 = !sh -c 'exit 1'
48 > exit1 = !sh -c 'exit 1'
48 >
49 >
49 > [defaults]
50 > [defaults]
50 > mylog = -q
51 > mylog = -q
51 > lognull = -q
52 > lognull = -q
52 > log = -v
53 > log = -v
53 > EOF
54 > EOF
54
55
55
56
56 basic
57 basic
57
58
58 $ hg myinit alias
59 $ hg myinit alias
59
60
60
61
61 unknown
62 unknown
62
63
63 $ hg unknown
64 $ hg unknown
64 alias 'unknown' resolves to unknown command 'bargle'
65 alias 'unknown' resolves to unknown command 'bargle'
65 [255]
66 [255]
66 $ hg help unknown
67 $ hg help unknown
67 alias 'unknown' resolves to unknown command 'bargle'
68 alias 'unknown' resolves to unknown command 'bargle'
68
69
69
70
70 ambiguous
71 ambiguous
71
72
72 $ hg ambiguous
73 $ hg ambiguous
73 alias 'ambiguous' resolves to ambiguous command 's'
74 alias 'ambiguous' resolves to ambiguous command 's'
74 [255]
75 [255]
75 $ hg help ambiguous
76 $ hg help ambiguous
76 alias 'ambiguous' resolves to ambiguous command 's'
77 alias 'ambiguous' resolves to ambiguous command 's'
77
78
78
79
79 recursive
80 recursive
80
81
81 $ hg recursive
82 $ hg recursive
82 alias 'recursive' resolves to unknown command 'recursive'
83 alias 'recursive' resolves to unknown command 'recursive'
83 [255]
84 [255]
84 $ hg help recursive
85 $ hg help recursive
85 alias 'recursive' resolves to unknown command 'recursive'
86 alias 'recursive' resolves to unknown command 'recursive'
86
87
87
88
89 disabled
90
91 $ hg disabled
92 alias 'disabled' resolves to unknown command 'email'
93 'email' is provided by the following extension:
94
95 patchbomb command to send changesets as (a series of) patch emails
96
97 (use "hg help extensions" for information on enabling extensions)
98 [255]
99 $ hg help disabled
100 alias 'disabled' resolves to unknown command 'email'
101 'email' is provided by the following extension:
102
103 patchbomb command to send changesets as (a series of) patch emails
104
105 (use "hg help extensions" for information on enabling extensions)
106
107
88 no definition
108 no definition
89
109
90 $ hg nodef
110 $ hg nodef
91 no definition for alias 'nodefinition'
111 no definition for alias 'nodefinition'
92 [255]
112 [255]
93 $ hg help nodef
113 $ hg help nodef
94 no definition for alias 'nodefinition'
114 no definition for alias 'nodefinition'
95
115
96
116
97 no closing quotation
117 no closing quotation
98
118
99 $ hg noclosing
119 $ hg noclosing
100 error in definition for alias 'noclosingquotation': No closing quotation
120 error in definition for alias 'noclosingquotation': No closing quotation
101 [255]
121 [255]
102 $ hg help noclosing
122 $ hg help noclosing
103 error in definition for alias 'noclosingquotation': No closing quotation
123 error in definition for alias 'noclosingquotation': No closing quotation
104
124
105
125
106 invalid options
126 invalid options
107
127
108 $ hg no--cwd
128 $ hg no--cwd
109 error in definition for alias 'no--cwd': --cwd may only be given on the command line
129 error in definition for alias 'no--cwd': --cwd may only be given on the command line
110 [255]
130 [255]
111 $ hg help no--cwd
131 $ hg help no--cwd
112 error in definition for alias 'no--cwd': --cwd may only be given on the command line
132 error in definition for alias 'no--cwd': --cwd may only be given on the command line
113 $ hg no-R
133 $ hg no-R
114 error in definition for alias 'no-R': -R may only be given on the command line
134 error in definition for alias 'no-R': -R may only be given on the command line
115 [255]
135 [255]
116 $ hg help no-R
136 $ hg help no-R
117 error in definition for alias 'no-R': -R may only be given on the command line
137 error in definition for alias 'no-R': -R may only be given on the command line
118 $ hg no--repo
138 $ hg no--repo
119 error in definition for alias 'no--repo': --repo may only be given on the command line
139 error in definition for alias 'no--repo': --repo may only be given on the command line
120 [255]
140 [255]
121 $ hg help no--repo
141 $ hg help no--repo
122 error in definition for alias 'no--repo': --repo may only be given on the command line
142 error in definition for alias 'no--repo': --repo may only be given on the command line
123 $ hg no--repository
143 $ hg no--repository
124 error in definition for alias 'no--repository': --repository may only be given on the command line
144 error in definition for alias 'no--repository': --repository may only be given on the command line
125 [255]
145 [255]
126 $ hg help no--repository
146 $ hg help no--repository
127 error in definition for alias 'no--repository': --repository may only be given on the command line
147 error in definition for alias 'no--repository': --repository may only be given on the command line
128 $ hg no--config
148 $ hg no--config
129 error in definition for alias 'no--config': --config may only be given on the command line
149 error in definition for alias 'no--config': --config may only be given on the command line
130 [255]
150 [255]
131
151
132 optional repository
152 optional repository
133
153
134 #if no-outer-repo
154 #if no-outer-repo
135 $ hg optionalrepo
155 $ hg optionalrepo
136 init
156 init
137 #endif
157 #endif
138 $ cd alias
158 $ cd alias
139 $ cat > .hg/hgrc <<EOF
159 $ cat > .hg/hgrc <<EOF
140 > [alias]
160 > [alias]
141 > myinit = init -q
161 > myinit = init -q
142 > EOF
162 > EOF
143 $ hg optionalrepo
163 $ hg optionalrepo
144 init -q
164 init -q
145
165
146 no usage
166 no usage
147
167
148 $ hg nousage
168 $ hg nousage
149 no rollback information available
169 no rollback information available
150 [1]
170 [1]
151
171
152 $ echo foo > foo
172 $ echo foo > foo
153 $ hg commit -Amfoo
173 $ hg commit -Amfoo
154 adding foo
174 adding foo
155
175
156
176
157 with opts
177 with opts
158
178
159 $ hg cleanst
179 $ hg cleanst
160 C foo
180 C foo
161
181
162
182
163 with opts and whitespace
183 with opts and whitespace
164
184
165 $ hg shortlog
185 $ hg shortlog
166 0 e63c23eaa88a | 1970-01-01 00:00 +0000
186 0 e63c23eaa88a | 1970-01-01 00:00 +0000
167
187
168 positional arguments
188 positional arguments
169
189
170 $ hg positional
190 $ hg positional
171 abort: too few arguments for command alias
191 abort: too few arguments for command alias
172 [255]
192 [255]
173 $ hg positional a
193 $ hg positional a
174 abort: too few arguments for command alias
194 abort: too few arguments for command alias
175 [255]
195 [255]
176 $ hg positional 'node|short' rev
196 $ hg positional 'node|short' rev
177 0 e63c23eaa88a | 1970-01-01 00:00 +0000
197 0 e63c23eaa88a | 1970-01-01 00:00 +0000
178
198
179 interaction with defaults
199 interaction with defaults
180
200
181 $ hg mylog
201 $ hg mylog
182 0:e63c23eaa88a
202 0:e63c23eaa88a
183 $ hg lognull
203 $ hg lognull
184 -1:000000000000
204 -1:000000000000
185
205
186
206
187 properly recursive
207 properly recursive
188
208
189 $ hg dln
209 $ hg dln
190 changeset: -1:0000000000000000000000000000000000000000
210 changeset: -1:0000000000000000000000000000000000000000
191 parent: -1:0000000000000000000000000000000000000000
211 parent: -1:0000000000000000000000000000000000000000
192 parent: -1:0000000000000000000000000000000000000000
212 parent: -1:0000000000000000000000000000000000000000
193 manifest: -1:0000000000000000000000000000000000000000
213 manifest: -1:0000000000000000000000000000000000000000
194 user:
214 user:
195 date: Thu Jan 01 00:00:00 1970 +0000
215 date: Thu Jan 01 00:00:00 1970 +0000
196 extra: branch=default
216 extra: branch=default
197
217
198
218
199
219
200 path expanding
220 path expanding
201
221
202 $ FOO=`pwd` hg put
222 $ FOO=`pwd` hg put
203 $ cat 0.diff
223 $ cat 0.diff
204 # HG changeset patch
224 # HG changeset patch
205 # User test
225 # User test
206 # Date 0 0
226 # Date 0 0
207 # Thu Jan 01 00:00:00 1970 +0000
227 # Thu Jan 01 00:00:00 1970 +0000
208 # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0
228 # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0
209 # Parent 0000000000000000000000000000000000000000
229 # Parent 0000000000000000000000000000000000000000
210 foo
230 foo
211
231
212 diff -r 000000000000 -r e63c23eaa88a foo
232 diff -r 000000000000 -r e63c23eaa88a foo
213 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
233 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
214 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
234 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
215 @@ -0,0 +1,1 @@
235 @@ -0,0 +1,1 @@
216 +foo
236 +foo
217
237
218
238
219 simple shell aliases
239 simple shell aliases
220
240
221 $ hg blank
241 $ hg blank
222
242
223 $ hg blank foo
243 $ hg blank foo
224
244
225 $ hg self
245 $ hg self
226 self
246 self
227 $ hg echoall
247 $ hg echoall
228
248
229 $ hg echoall foo
249 $ hg echoall foo
230 foo
250 foo
231 $ hg echoall 'test $2' foo
251 $ hg echoall 'test $2' foo
232 test $2 foo
252 test $2 foo
233 $ hg echoall 'test $@' foo '$@'
253 $ hg echoall 'test $@' foo '$@'
234 test $@ foo $@
254 test $@ foo $@
235 $ hg echoall 'test "$@"' foo '"$@"'
255 $ hg echoall 'test "$@"' foo '"$@"'
236 test "$@" foo "$@"
256 test "$@" foo "$@"
237 $ hg echo1 foo bar baz
257 $ hg echo1 foo bar baz
238 foo
258 foo
239 $ hg echo2 foo bar baz
259 $ hg echo2 foo bar baz
240 bar
260 bar
241 $ hg echo13 foo bar baz test
261 $ hg echo13 foo bar baz test
242 foo baz
262 foo baz
243 $ hg echo2 foo
263 $ hg echo2 foo
244
264
245 $ hg echotokens
265 $ hg echotokens
246
266
247 $ hg echotokens foo 'bar $1 baz'
267 $ hg echotokens foo 'bar $1 baz'
248 foo
268 foo
249 bar $1 baz
269 bar $1 baz
250 $ hg echotokens 'test $2' foo
270 $ hg echotokens 'test $2' foo
251 test $2
271 test $2
252 foo
272 foo
253 $ hg echotokens 'test $@' foo '$@'
273 $ hg echotokens 'test $@' foo '$@'
254 test $@
274 test $@
255 foo
275 foo
256 $@
276 $@
257 $ hg echotokens 'test "$@"' foo '"$@"'
277 $ hg echotokens 'test "$@"' foo '"$@"'
258 test "$@"
278 test "$@"
259 foo
279 foo
260 "$@"
280 "$@"
261 $ echo bar > bar
281 $ echo bar > bar
262 $ hg commit -qA -m bar
282 $ hg commit -qA -m bar
263 $ hg count .
283 $ hg count .
264 1
284 1
265 $ hg count 'branch(default)'
285 $ hg count 'branch(default)'
266 2
286 2
267 $ hg mcount -r '"branch(default)"'
287 $ hg mcount -r '"branch(default)"'
268 2
288 2
269
289
270 $ hg tglog
290 $ hg tglog
271 @ 1:042423737847: 'bar'
291 @ 1:042423737847: 'bar'
272 |
292 |
273 o 0:e63c23eaa88a: 'foo'
293 o 0:e63c23eaa88a: 'foo'
274
294
275
295
276
296
277 shadowing
297 shadowing
278
298
279 $ hg i
299 $ hg i
280 hg: command 'i' is ambiguous:
300 hg: command 'i' is ambiguous:
281 idalias idaliaslong idaliasshell identify import incoming init
301 idalias idaliaslong idaliasshell identify import incoming init
282 [255]
302 [255]
283 $ hg id
303 $ hg id
284 042423737847 tip
304 042423737847 tip
285 $ hg ida
305 $ hg ida
286 hg: command 'ida' is ambiguous:
306 hg: command 'ida' is ambiguous:
287 idalias idaliaslong idaliasshell
307 idalias idaliaslong idaliasshell
288 [255]
308 [255]
289 $ hg idalias
309 $ hg idalias
290 042423737847 tip
310 042423737847 tip
291 $ hg idaliasl
311 $ hg idaliasl
292 042423737847 tip
312 042423737847 tip
293 $ hg idaliass
313 $ hg idaliass
294 test
314 test
295 $ hg parentsshell
315 $ hg parentsshell
296 hg: command 'parentsshell' is ambiguous:
316 hg: command 'parentsshell' is ambiguous:
297 parentsshell1 parentsshell2
317 parentsshell1 parentsshell2
298 [255]
318 [255]
299 $ hg parentsshell1
319 $ hg parentsshell1
300 one
320 one
301 $ hg parentsshell2
321 $ hg parentsshell2
302 two
322 two
303
323
304
324
305 shell aliases with global options
325 shell aliases with global options
306
326
307 $ hg init sub
327 $ hg init sub
308 $ cd sub
328 $ cd sub
309 $ hg count 'branch(default)'
329 $ hg count 'branch(default)'
310 abort: unknown revision 'default'!
330 abort: unknown revision 'default'!
311 0
331 0
312 $ hg -v count 'branch(default)'
332 $ hg -v count 'branch(default)'
313 abort: unknown revision 'default'!
333 abort: unknown revision 'default'!
314 0
334 0
315 $ hg -R .. count 'branch(default)'
335 $ hg -R .. count 'branch(default)'
316 abort: unknown revision 'default'!
336 abort: unknown revision 'default'!
317 0
337 0
318 $ hg --cwd .. count 'branch(default)'
338 $ hg --cwd .. count 'branch(default)'
319 2
339 2
320 $ hg echoall --cwd ..
340 $ hg echoall --cwd ..
321
341
322
342
323
343
324 repo specific shell aliases
344 repo specific shell aliases
325
345
326 $ cat >> .hg/hgrc <<EOF
346 $ cat >> .hg/hgrc <<EOF
327 > [alias]
347 > [alias]
328 > subalias = !echo sub
348 > subalias = !echo sub
329 > EOF
349 > EOF
330 $ cat >> ../.hg/hgrc <<EOF
350 $ cat >> ../.hg/hgrc <<EOF
331 > [alias]
351 > [alias]
332 > mainalias = !echo main
352 > mainalias = !echo main
333 > EOF
353 > EOF
334
354
335
355
336 shell alias defined in current repo
356 shell alias defined in current repo
337
357
338 $ hg subalias
358 $ hg subalias
339 sub
359 sub
340 $ hg --cwd .. subalias > /dev/null
360 $ hg --cwd .. subalias > /dev/null
341 hg: unknown command 'subalias'
361 hg: unknown command 'subalias'
342 [255]
362 [255]
343 $ hg -R .. subalias > /dev/null
363 $ hg -R .. subalias > /dev/null
344 hg: unknown command 'subalias'
364 hg: unknown command 'subalias'
345 [255]
365 [255]
346
366
347
367
348 shell alias defined in other repo
368 shell alias defined in other repo
349
369
350 $ hg mainalias > /dev/null
370 $ hg mainalias > /dev/null
351 hg: unknown command 'mainalias'
371 hg: unknown command 'mainalias'
352 [255]
372 [255]
353 $ hg -R .. mainalias
373 $ hg -R .. mainalias
354 main
374 main
355 $ hg --cwd .. mainalias
375 $ hg --cwd .. mainalias
356 main
376 main
357
377
358
378
359 shell aliases with escaped $ chars
379 shell aliases with escaped $ chars
360
380
361 $ hg escaped1
381 $ hg escaped1
362 test$test
382 test$test
363 $ hg escaped2
383 $ hg escaped2
364 HGFOO is BAR
384 HGFOO is BAR
365 $ hg escaped3 HGFOO
385 $ hg escaped3 HGFOO
366 HGFOO is BAR
386 HGFOO is BAR
367 $ hg escaped4 test
387 $ hg escaped4 test
368 $0 $@
388 $0 $@
369
389
370 abbreviated name, which matches against both shell alias and the
390 abbreviated name, which matches against both shell alias and the
371 command provided extension, should be aborted.
391 command provided extension, should be aborted.
372
392
373 $ cat >> .hg/hgrc <<EOF
393 $ cat >> .hg/hgrc <<EOF
374 > [extensions]
394 > [extensions]
375 > hgext.rebase =
395 > hgext.rebase =
376 > [alias]
396 > [alias]
377 > rebate = !echo this is rebate
397 > rebate = !echo this is rebate
378 > EOF
398 > EOF
379 $ hg reba
399 $ hg reba
380 hg: command 'reba' is ambiguous:
400 hg: command 'reba' is ambiguous:
381 rebase rebate
401 rebase rebate
382 [255]
402 [255]
383 $ hg rebat
403 $ hg rebat
384 this is rebate
404 this is rebate
385
405
386 invalid arguments
406 invalid arguments
387
407
388 $ hg rt foo
408 $ hg rt foo
389 hg rt: invalid arguments
409 hg rt: invalid arguments
390 hg rt
410 hg rt
391
411
392 alias for: hg root
412 alias for: hg root
393
413
394 (use "hg rt -h" to show more help)
414 (use "hg rt -h" to show more help)
395 [255]
415 [255]
396
416
397 invalid global arguments for normal commands, aliases, and shell aliases
417 invalid global arguments for normal commands, aliases, and shell aliases
398
418
399 $ hg --invalid root
419 $ hg --invalid root
400 hg: option --invalid not recognized
420 hg: option --invalid not recognized
401 Mercurial Distributed SCM
421 Mercurial Distributed SCM
402
422
403 basic commands:
423 basic commands:
404
424
405 add add the specified files on the next commit
425 add add the specified files on the next commit
406 annotate show changeset information by line for each file
426 annotate show changeset information by line for each file
407 clone make a copy of an existing repository
427 clone make a copy of an existing repository
408 commit commit the specified files or all outstanding changes
428 commit commit the specified files or all outstanding changes
409 diff diff repository (or selected files)
429 diff diff repository (or selected files)
410 export dump the header and diffs for one or more changesets
430 export dump the header and diffs for one or more changesets
411 forget forget the specified files on the next commit
431 forget forget the specified files on the next commit
412 init create a new repository in the given directory
432 init create a new repository in the given directory
413 log show revision history of entire repository or files
433 log show revision history of entire repository or files
414 merge merge working directory with another revision
434 merge merge working directory with another revision
415 pull pull changes from the specified source
435 pull pull changes from the specified source
416 push push changes to the specified destination
436 push push changes to the specified destination
417 remove remove the specified files on the next commit
437 remove remove the specified files on the next commit
418 serve start stand-alone webserver
438 serve start stand-alone webserver
419 status show changed files in the working directory
439 status show changed files in the working directory
420 summary summarize working directory state
440 summary summarize working directory state
421 update update working directory (or switch revisions)
441 update update working directory (or switch revisions)
422
442
423 (use "hg help" for the full list of commands or "hg -v" for details)
443 (use "hg help" for the full list of commands or "hg -v" for details)
424 [255]
444 [255]
425 $ hg --invalid mylog
445 $ hg --invalid mylog
426 hg: option --invalid not recognized
446 hg: option --invalid not recognized
427 Mercurial Distributed SCM
447 Mercurial Distributed SCM
428
448
429 basic commands:
449 basic commands:
430
450
431 add add the specified files on the next commit
451 add add the specified files on the next commit
432 annotate show changeset information by line for each file
452 annotate show changeset information by line for each file
433 clone make a copy of an existing repository
453 clone make a copy of an existing repository
434 commit commit the specified files or all outstanding changes
454 commit commit the specified files or all outstanding changes
435 diff diff repository (or selected files)
455 diff diff repository (or selected files)
436 export dump the header and diffs for one or more changesets
456 export dump the header and diffs for one or more changesets
437 forget forget the specified files on the next commit
457 forget forget the specified files on the next commit
438 init create a new repository in the given directory
458 init create a new repository in the given directory
439 log show revision history of entire repository or files
459 log show revision history of entire repository or files
440 merge merge working directory with another revision
460 merge merge working directory with another revision
441 pull pull changes from the specified source
461 pull pull changes from the specified source
442 push push changes to the specified destination
462 push push changes to the specified destination
443 remove remove the specified files on the next commit
463 remove remove the specified files on the next commit
444 serve start stand-alone webserver
464 serve start stand-alone webserver
445 status show changed files in the working directory
465 status show changed files in the working directory
446 summary summarize working directory state
466 summary summarize working directory state
447 update update working directory (or switch revisions)
467 update update working directory (or switch revisions)
448
468
449 (use "hg help" for the full list of commands or "hg -v" for details)
469 (use "hg help" for the full list of commands or "hg -v" for details)
450 [255]
470 [255]
451 $ hg --invalid blank
471 $ hg --invalid blank
452 hg: option --invalid not recognized
472 hg: option --invalid not recognized
453 Mercurial Distributed SCM
473 Mercurial Distributed SCM
454
474
455 basic commands:
475 basic commands:
456
476
457 add add the specified files on the next commit
477 add add the specified files on the next commit
458 annotate show changeset information by line for each file
478 annotate show changeset information by line for each file
459 clone make a copy of an existing repository
479 clone make a copy of an existing repository
460 commit commit the specified files or all outstanding changes
480 commit commit the specified files or all outstanding changes
461 diff diff repository (or selected files)
481 diff diff repository (or selected files)
462 export dump the header and diffs for one or more changesets
482 export dump the header and diffs for one or more changesets
463 forget forget the specified files on the next commit
483 forget forget the specified files on the next commit
464 init create a new repository in the given directory
484 init create a new repository in the given directory
465 log show revision history of entire repository or files
485 log show revision history of entire repository or files
466 merge merge working directory with another revision
486 merge merge working directory with another revision
467 pull pull changes from the specified source
487 pull pull changes from the specified source
468 push push changes to the specified destination
488 push push changes to the specified destination
469 remove remove the specified files on the next commit
489 remove remove the specified files on the next commit
470 serve start stand-alone webserver
490 serve start stand-alone webserver
471 status show changed files in the working directory
491 status show changed files in the working directory
472 summary summarize working directory state
492 summary summarize working directory state
473 update update working directory (or switch revisions)
493 update update working directory (or switch revisions)
474
494
475 (use "hg help" for the full list of commands or "hg -v" for details)
495 (use "hg help" for the full list of commands or "hg -v" for details)
476 [255]
496 [255]
477
497
478 This should show id:
498 This should show id:
479
499
480 $ hg --config alias.log='id' log
500 $ hg --config alias.log='id' log
481 000000000000 tip
501 000000000000 tip
482
502
483 This shouldn't:
503 This shouldn't:
484
504
485 $ hg --config alias.log='id' history
505 $ hg --config alias.log='id' history
486
506
487 $ cd ../..
507 $ cd ../..
488
508
489 return code of command and shell aliases:
509 return code of command and shell aliases:
490
510
491 $ hg mycommit -R alias
511 $ hg mycommit -R alias
492 nothing changed
512 nothing changed
493 [1]
513 [1]
494 $ hg exit1
514 $ hg exit1
495 [1]
515 [1]
General Comments 0
You need to be logged in to leave comments. Login now