py3: use bytes instead of str in instance()
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 05 Apr 2018 16:54:56 +0530
changeset 45036 1ccd75027abbc9487acaf2ccbc9a1acbef194bb1
parent 45035 1d26f745a10b09ae800ab6005aaadde5019753f9
child 45037 b23e3cc1afd43f9aa0be426724d84e4a61fdf592
push id779
push usergszorc@mozilla.com
push dateFri, 06 Apr 2018 17:27:47 +0000
py3: use bytes instead of str in instance() We deal internally with bytes, so we should check whether the remote is a bytes or not. Differential Revision: https://phab.mercurial-scm.org/D3126
mercurial/logexchange.py
--- a/mercurial/logexchange.py
+++ b/mercurial/logexchange.py
@@ -101,17 +101,17 @@ def activepath(repo, remote):
     # is the remote a local peer
     local = remote.local()
 
     # determine the remote path from the repo, if possible; else just
     # use the string given to us
     rpath = remote
     if local:
         rpath = remote._repo.root
-    elif not isinstance(remote, str):
+    elif not isinstance(remote, bytes):
         rpath = remote._url
 
     # represent the remotepath with user defined path name if exists
     for path, url in repo.ui.configitems('paths'):
         # remove auth info from user defined url
         url = util.removeauth(url)
         if url == rpath:
             rpath = path