[PATCH 2 of 4] py3: replace str() with pycompat.bytestr()
Pulkit Goyal
7895pulkit at gmail.com
Fri Apr 7 06:59:38 EDT 2017
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1491552995 -19800
# Fri Apr 07 13:46:35 2017 +0530
# Node ID c08552f3a4ab883aac255bc7d8efb7637ba245d8
# Parent 6b32872e4896993efe0abcc13b6d9c4c9b8687b7
py3: replace str() with pycompat.bytestr()
diff -r 6b32872e4896 -r c08552f3a4ab mercurial/hg.py
--- a/mercurial/hg.py Fri Apr 07 13:45:33 2017 +0530
+++ b/mercurial/hg.py Fri Apr 07 13:46:35 2017 +0530
@@ -31,6 +31,7 @@
merge as mergemod,
node,
phases,
+ pycompat,
repoview,
scmutil,
sshpeer,
@@ -103,7 +104,7 @@
if u.fragment:
branch = u.fragment
u.fragment = None
- return str(u), (branch, branches or [])
+ return pycompat.bytestr(u), (branch, branches or [])
schemes = {
'bundle': bundlerepo,
diff -r 6b32872e4896 -r c08552f3a4ab mercurial/util.py
--- a/mercurial/util.py Fri Apr 07 13:45:33 2017 +0530
+++ b/mercurial/util.py Fri Apr 07 13:46:35 2017 +0530
@@ -2799,7 +2799,7 @@
user, passwd = self.user, self.passwd
try:
self.user, self.passwd = None, None
- s = str(self)
+ s = pycompat.bytestr(self)
finally:
self.user, self.passwd = user, passwd
if not self.user:
@@ -2854,7 +2854,7 @@
u = url(u)
if u.passwd:
u.passwd = '***'
- return str(u)
+ return pycompat.bytestr(u)
def removeauth(u):
'''remove all authentication information from a url string'''
More information about the Mercurial-devel
mailing list