# HG changeset patch # User Bill Schroeder # Date 1257363855 21600 # Node ID 0d850f8beea68e7c6f7f312148546900cfc58898 # Parent 87c92b2607105ba2dd25fc1b466dfa1546fc1e6d dispatch: better error message for --config option diff -r 87c92b260710 -r 0d850f8beea6 mercurial/dispatch.py --- 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). diff -r 87c92b260710 -r 0d850f8beea6 tests/test-globalopts.out --- 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