comparison mercurial/ui.py @ 46620:7621ab4005bf

config: use a new `alter` method in `fixconfig` The `set` function is doing various work related to metadata (eg: the source, later the level). However the `fixconfig` call only updating some values according to standard processing, not changing any of the related metadata. So we introduce a new method and use it there. Differential Revision: https://phab.mercurial-scm.org/D9924
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 30 Jan 2021 00:32:42 +0100
parents 839cacdff919
children a3dced4b7b04
comparison
equal deleted inserted replaced
46619:f2fc34e88238 46620:7621ab4005bf
552 ) 552 )
553 p = p.replace(b'%%', b'%') 553 p = p.replace(b'%%', b'%')
554 p = util.expandpath(p) 554 p = util.expandpath(p)
555 if not util.hasscheme(p) and not os.path.isabs(p): 555 if not util.hasscheme(p) and not os.path.isabs(p):
556 p = os.path.normpath(os.path.join(root, p)) 556 p = os.path.normpath(os.path.join(root, p))
557 c.set(b"paths", n, p) 557 c.alter(b"paths", n, p)
558 558
559 if section in (None, b'ui'): 559 if section in (None, b'ui'):
560 # update ui options 560 # update ui options
561 self._fmsgout, self._fmsgerr = _selectmsgdests(self) 561 self._fmsgout, self._fmsgerr = _selectmsgdests(self)
562 self.debugflag = self.configbool(b'ui', b'debug') 562 self.debugflag = self.configbool(b'ui', b'debug')