Patchwork D6712: config: remove pycompat.bytestr() for defaultvalue

login
register
mail settings
Submitter phabricator
Date Aug. 7, 2019, 9:32 p.m.
Message ID <09521c01896b7699e2a8c635c8027de1@localhost.localdomain>
Download mbox | patch
Permalink /patch/41201/
State Not Applicable
Headers show

Comments

phabricator - Aug. 7, 2019, 9:32 p.m.
Closed by commit rHG049b2ac3252e: config: remove pycompat.bytestr() for defaultvalue (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6712?vs=16148&id=16151

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6712/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6712

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS




To: navaneeth.suresh, #hg-reviewers, pulkit
Cc: pulkit, durin42, marmoute, mercurial-devel

Patch

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -70,7 +70,7 @@ 
   $ hg showconfig Section.KeY -Tjson
   [
    {
-    "defaultvalue": "None",
+    "defaultvalue": null,
     "name": "Section.KeY",
     "source": "*.hgrc:*", (glob)
     "value": "Case Sensitive"
@@ -103,7 +103,7 @@ 
   $ hg config empty.source -Tjson
   [
    {
-    "defaultvalue": "None",
+    "defaultvalue": null,
     "name": "empty.source",
     "source": "",
     "value": "value"
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1872,7 +1872,7 @@ 
     for section, name, value in ui.walkconfig(untrusted=untrusted):
         source = ui.configsource(section, name, untrusted)
         value = pycompat.bytestr(value)
-        defaultvalue = pycompat.bytestr(ui.configdefault(section, name))
+        defaultvalue = ui.configdefault(section, name)
         if fm.isplain():
             source = source or 'none'
             value = value.replace('\n', '\\n')