changeset 31305:dc9842a7017c

dispatch: enforce bytes when converting boolean flags to config items This fixes --verbose on Python 3.
author Augie Fackler <raf@durin42.com>
date Fri, 03 Mar 2017 14:43:27 -0500
parents dab92f3dbd98
children c920efa9d34b
files mercurial/dispatch.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Mar 03 13:52:08 2017 -0500
+++ b/mercurial/dispatch.py	Fri Mar 03 14:43:27 2017 -0500
@@ -747,6 +747,8 @@
         if options['verbose'] or options['debug'] or options['quiet']:
             for opt in ('verbose', 'debug', 'quiet'):
                 val = str(bool(options[opt]))
+                if pycompat.ispy3:
+                    val = val.encode('ascii')
                 for ui_ in uis:
                     ui_.setconfig('ui', opt, val, '--' + opt)