Patchwork D1555: py3: use bytes in place of basestring

login
register
mail settings
Submitter phabricator
Date Dec. 2, 2017, 3:12 a.m.
Message ID <fc563a815004989648f379a045ad0a67@localhost.localdomain>
Download mbox | patch
Permalink /patch/25888/
State Not Applicable
Headers show

Comments

phabricator - Dec. 2, 2017, 3:12 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2523ab8ba69d: py3: use bytes in place of basestring (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1555?vs=4048&id=4081

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

AFFECTED FILES
  hgext/convert/convcmd.py
  mercurial/cmdutil.py
  mercurial/httppeer.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -222,7 +222,7 @@ 
             if not data:
                 data = strargs
             else:
-                if isinstance(data, basestring):
+                if isinstance(data, bytes):
                     i = io.BytesIO(data)
                     i.length = len(data)
                     data = i
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3731,7 +3731,7 @@ 
                                 else:
                                     util.rename(target, bakname)
                     if ui.verbose or not exact:
-                        if not isinstance(msg, basestring):
+                        if not isinstance(msg, bytes):
                             msg = msg(abs)
                         ui.status(msg % rel)
                 elif exact:
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -450,7 +450,7 @@ 
         commit = self.commitcache[rev]
         full = self.opts.get('full')
         changes = self.source.getchanges(rev, full)
-        if isinstance(changes, basestring):
+        if isinstance(changes, bytes):
             if changes == SKIPREV:
                 dest = SKIPREV
             else: