diff mercurial/templatekw.py @ 32970:11c0bb4ccc76

py3: replace str with bytes in isinstance() We were using str because on Python 2, str were bytes but now we have to use bytes. Otherwise the if conditions fails and we have weird results from commands on Python 3.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 20 Jun 2017 23:46:18 +0530
parents 7f1d07d2c8f8
children 26e710f0468f
line wrap: on
line diff
--- a/mercurial/templatekw.py	Tue Jun 20 22:11:46 2017 +0530
+++ b/mercurial/templatekw.py	Tue Jun 20 23:46:18 2017 +0530
@@ -126,7 +126,7 @@
             yield templ(noname, **mapping)
         return
     if name not in templ:
-        if isinstance(values[0], str):
+        if isinstance(values[0], bytes):
             yield separator.join(values)
         else:
             for v in values: