Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/tests/test-alias.out Tue Jul 27 20:50:09 2010 +0530 +++ b/tests/test-alias.out Tue Jul 27 14:43:40 2010 +0200 @@ -11,6 +11,15 @@ % no definition no definition for alias 'nodefinition' no definition for alias 'nodefinition' +% invalid options +error in definition for alias 'no--cwd': --cwd may only be given on the command line +error in definition for alias 'no--cwd': --cwd may only be given on the command line +error in definition for alias 'no-R': -R may only be given on the command line +error in definition for alias 'no-R': -R may only be given on the command line +error in definition for alias 'no--repo': --repo may only be given on the command line +error in definition for alias 'no--repo': --repo may only be given on the command line +error in definition for alias 'no--repository': --repository may only be given on the command line +error in definition for alias 'no--repository': --repository may only be given on the command line % no usage no rollback information available adding foo