[PATCH 2 of 9] py3: replace "if ispy3" by pycompat.bytestr()
Yuya Nishihara
yuya at tcha.org
Sat Feb 3 03:36:13 EST 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1517026306 -32400
# Sat Jan 27 13:11:46 2018 +0900
# Node ID ab13ecb04e6665222ad3e10308dc7c2b84b3138b
# Parent f4250fa75585535cd97f378d27b4d999d4ccc359
py3: replace "if ispy3" by pycompat.bytestr()
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -821,9 +821,7 @@ def _dispatch(req):
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')
+ val = pycompat.bytestr(bool(options[opt]))
for ui_ in uis:
ui_.setconfig('ui', opt, val, '--' + opt)
More information about the Mercurial-devel
mailing list