diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1881,8 +1881,8 @@ continue fm.startitem() fm.condwrite(ui.debugflag, 'source', '%s: ', source) + fm.data(name=entryname, defaultvalue=defaultvalue) if uniquesel: - fm.data(name=entryname, defaultvalue=defaultvalue) fm.write('value', '%s\n', value) else: fm.write('name value', '%s=%s\n', entryname, value) diff --git a/tests/test-config.t b/tests/test-config.t --- a/tests/test-config.t +++ b/tests/test-config.t @@ -57,11 +57,13 @@ $ hg showconfig Section -Tjson [ { + "defaultvalue": null, "name": "Section.KeY", "source": "*.hgrc:*", (glob) "value": "Case Sensitive" }, { + "defaultvalue": null, "name": "Section.key", "source": "*.hgrc:*", (glob) "value": "lower case" @@ -77,8 +79,8 @@ } ] $ hg showconfig -Tjson | tail -7 - }, { + "defaultvalue": null, "name": "*", (glob) "source": "*", (glob) "value": "*" (glob)