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