comparison mercurial/ui.py @ 47189:b0e92313107e

parselist: move the function from config to stringutil We move the function in a lower level module to avoid cycle. It moves next to `parsebool` who had to migrate for the same reasons. Differential Revision: https://phab.mercurial-scm.org/D10449
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 16 Apr 2021 01:18:28 +0200
parents 9ea75ea23534
children bcafcd779d2e
comparison
equal deleted inserted replaced
47188:353718f741a8 47189:b0e92313107e
885 >>> u.configlist(s, b'list2') 885 >>> u.configlist(s, b'list2')
886 ['this', 'is', 'a small', 'test'] 886 ['this', 'is', 'a small', 'test']
887 """ 887 """
888 # default is not always a list 888 # default is not always a list
889 v = self.configwith( 889 v = self.configwith(
890 config.parselist, section, name, default, b'list', untrusted 890 stringutil.parselist, section, name, default, b'list', untrusted
891 ) 891 )
892 if isinstance(v, bytes): 892 if isinstance(v, bytes):
893 return config.parselist(v) 893 return stringutil.parselist(v)
894 elif v is None: 894 elif v is None:
895 return [] 895 return []
896 return v 896 return v
897 897
898 def configdate(self, section, name, default=_unset, untrusted=False): 898 def configdate(self, section, name, default=_unset, untrusted=False):