comparison mercurial/commands.py @ 42705:049b2ac3252e

config: remove pycompat.bytestr() for defaultvalue This is a follow-up patch to 51a2e3102db2. This removes `pycompat.bytestr` to preserve `None` in `commands.config()`. Differential Revision: https://phab.mercurial-scm.org/D6712
author Navaneeth Suresh <navaneeths1998@gmail.com>
date Sat, 03 Aug 2019 12:14:34 +0530
parents 51a2e3102db2
children 60789444acd6
comparison
equal deleted inserted replaced
42704:6957f7b93e03 42705:049b2ac3252e
1870 1870
1871 matched = False 1871 matched = False
1872 for section, name, value in ui.walkconfig(untrusted=untrusted): 1872 for section, name, value in ui.walkconfig(untrusted=untrusted):
1873 source = ui.configsource(section, name, untrusted) 1873 source = ui.configsource(section, name, untrusted)
1874 value = pycompat.bytestr(value) 1874 value = pycompat.bytestr(value)
1875 defaultvalue = pycompat.bytestr(ui.configdefault(section, name)) 1875 defaultvalue = ui.configdefault(section, name)
1876 if fm.isplain(): 1876 if fm.isplain():
1877 source = source or 'none' 1877 source = source or 'none'
1878 value = value.replace('\n', '\\n') 1878 value = value.replace('\n', '\\n')
1879 entryname = section + '.' + name 1879 entryname = section + '.' + name
1880 if values and not (section in selsections or entryname in selentries): 1880 if values and not (section in selsections or entryname in selentries):