Patchwork D3126: py3: use bytes instead of str in instance()

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:31 p.m.
Message ID <differential-rev-PHID-DREV-j6cvziny5m4ocbogyvwp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30353/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 12:31 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We deal internally with bytes, so we should check whether the remote is a bytes
  or not.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/logexchange.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/logexchange.py b/mercurial/logexchange.py
--- a/mercurial/logexchange.py
+++ b/mercurial/logexchange.py
@@ -106,7 +106,7 @@ 
     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