diff mercurial/hg.py @ 33753: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 a25cc3ca874f
children 071732d9c210
line wrap: on
line diff
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -477,7 +477,7 @@
     remote's path/URL. Defaults to "identity."
     """
 
-    if isinstance(source, str):
+    if isinstance(source, bytes):
         origsource = ui.expandpath(source)
         source, branch = parseurl(origsource, branch)
         srcpeer = peer(ui, peeropts, source)