diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py --- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -120,6 +120,7 @@ ignore = [ '_xmlplus', 'fcntl', 'win32com.gen_py', + '_winreg', # 2.7 mimetypes needs immediate ImportError 'pythoncom', # imported by tarfile, not available under Windows 'pwd', diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -134,6 +134,8 @@ class ui(object): v = self.config(section, name, None, untrusted) if v is None: return default + if isinstance(v, bool): + return v if v.lower() not in _booleans: raise error.ConfigError(_("%s.%s not a boolean ('%s')") % (section, name, v))