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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Apr 5 12:31:21 UTC 2018


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

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



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


More information about the Mercurial-devel mailing list