Mercurial > hg
changeset 9825:0d850f8beea6
dispatch: better error message for --config option
author | Bill Schroeder <bschroeder@allstontrading.com> |
---|---|
date | Wed, 04 Nov 2009 13:44:15 -0600 |
parents | 87c92b260710 |
children | d768614578dd |
files | mercurial/dispatch.py tests/test-globalopts.out |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py Wed Nov 11 00:05:12 2009 +0100 +++ b/mercurial/dispatch.py Wed Nov 04 13:44:15 2009 -0600 @@ -279,7 +279,8 @@ raise IndexError ui.setconfig(section, name, value) except (IndexError, ValueError): - raise util.Abort(_('malformed --config option: %s') % cfg) + raise util.Abort(_('malformed --config option: %r ' + '(use --config section.name=value)') % cfg) def _earlygetopt(aliases, args): """Return list of values for an option (or aliases).
--- a/tests/test-globalopts.out Wed Nov 11 00:05:12 2009 +0100 +++ b/tests/test-globalopts.out Wed Nov 04 13:44:15 2009 -0600 @@ -107,11 +107,11 @@ %% --config quuxfoo -abort: malformed --config option: -abort: malformed --config option: a.b -abort: malformed --config option: a -abort: malformed --config option: a.= -abort: malformed --config option: .b= +abort: malformed --config option: '' (use --config section.name=value) +abort: malformed --config option: 'a.b' (use --config section.name=value) +abort: malformed --config option: 'a' (use --config section.name=value) +abort: malformed --config option: 'a.=' (use --config section.name=value) +abort: malformed --config option: '.b=' (use --config section.name=value) %% --debug changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a tag: tip