# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1512127435 -19800 # Node ID bfd072c52e03cc14bd2b36bd982c15b5029e6fa8 # Parent 5cc14407a739ff54739e55907760306c9a9418fe py3: use bytes in place of basestring All strings in mercurial must be bytes so we can easily replace basestring with bytes. Differential Revision: https://phab.mercurial-scm.org/D1555 diff -r 5cc14407a739 -r bfd072c52e03 hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py Fri Dec 01 14:13:55 2017 -0800 +++ b/hgext/convert/convcmd.py Fri Dec 01 16:53:55 2017 +0530 @@ -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: diff -r 5cc14407a739 -r bfd072c52e03 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Fri Dec 01 14:13:55 2017 -0800 +++ b/mercurial/cmdutil.py Fri Dec 01 16:53:55 2017 +0530 @@ -3722,7 +3722,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 -r 5cc14407a739 -r bfd072c52e03 mercurial/httppeer.py --- a/mercurial/httppeer.py Fri Dec 01 14:13:55 2017 -0800 +++ b/mercurial/httppeer.py Fri Dec 01 16:53:55 2017 +0530 @@ -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