Patchwork D2434: util: use pycompat.bytestr() instead of str()

login
register
mail settings
Submitter phabricator
Date Feb. 26, 2018, 5:16 a.m.
Message ID <a3b640a280113875f4319f5578f4634b@localhost.localdomain>
Download mbox | patch
Permalink /patch/28363/
State Not Applicable
Headers show

Comments

phabricator - Feb. 26, 2018, 5:16 a.m.
durin42 updated this revision to Diff 6085.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2434?vs=6079&id=6085

REVISION DETAIL
  https://phab.mercurial-scm.org/D2434

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1188,7 +1188,7 @@ 
             return '0'
         if val is True:
             return '1'
-        return str(val)
+        return pycompat.bytestr(val)
     env = dict(encoding.environ)
     if environ:
         env.update((k, py2shell(v)) for k, v in environ.iteritems())