comparison tests/test-alias.out @ 11695:ee8f36a6c766

alias: improved diagnostic when arguments include --cwd, etc. The logic pre-emptively checks for -R, --repo, --repository and --cwd in order to give the user a more helpful error message. In addition, each option is handled invididually, which avoids listing them all in the error. Before: % hg --config alias.broken='push --cwd /dev/null' broken abort: Option --cwd may not be abbreviated! After: % hg --config alias.broken='push --cwd /dev/null' broken error in definition for alias 'broken': --cwd may only be given on the command line
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 27 Jul 2010 14:43:40 +0200
parents c5e555e064d0
children
comparison
equal deleted inserted replaced
11694:bf49d48e4602 11695:ee8f36a6c766
9 alias 'recursive' resolves to unknown command 'recursive' 9 alias 'recursive' resolves to unknown command 'recursive'
10 alias 'recursive' resolves to unknown command 'recursive' 10 alias 'recursive' resolves to unknown command 'recursive'
11 % no definition 11 % no definition
12 no definition for alias 'nodefinition' 12 no definition for alias 'nodefinition'
13 no definition for alias 'nodefinition' 13 no definition for alias 'nodefinition'
14 % invalid options
15 error in definition for alias 'no--cwd': --cwd may only be given on the command line
16 error in definition for alias 'no--cwd': --cwd may only be given on the command line
17 error in definition for alias 'no-R': -R may only be given on the command line
18 error in definition for alias 'no-R': -R may only be given on the command line
19 error in definition for alias 'no--repo': --repo may only be given on the command line
20 error in definition for alias 'no--repo': --repo may only be given on the command line
21 error in definition for alias 'no--repository': --repository may only be given on the command line
22 error in definition for alias 'no--repository': --repository may only be given on the command line
14 % no usage 23 % no usage
15 no rollback information available 24 no rollback information available
16 adding foo 25 adding foo
17 % with opts 26 % with opts
18 C foo 27 C foo