diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -279,7 +279,8 @@ def _parseconfig(ui, config): 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 --git a/tests/test-globalopts.out b/tests/test-globalopts.out --- a/tests/test-globalopts.out +++ b/tests/test-globalopts.out @@ -107,11 +107,11 @@ b %% --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