On Mon, 7 Nov 2016 00:15:21 +0530, Pulkit Goyal wrote: > This > https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-October/089099.html > is a better version of what I want to do, since this didn't went > through I will be using this.
I'm okay with that pycompat.basestring stuff, but I'm pretty sure most of our basestring uses are moot since we avoid using unicodes except for very specific string manipulations. > >> @@ -520,7 +520,12 @@ > >> result = self.config(section, name, untrusted=untrusted) > >> if result is None: > >> result = default or [] > >> - if isinstance(result, basestring): > >> + checkunicode = False > >> + try: > >> + checkunicode = isinstance(result, basestring) > >> + except NameError: > >> + checkunicode = isinstance(result, str) > >> + if checkunicode: > >> result = _configlist(result.lstrip(' ,\n')) And with this change, ui.configlist() would look as if it supports unicodes, which seems confusing. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel