comparison mercurial/util.py @ 37366:b23e3cc1afd4

py3: return bytes from util.removeauth() util.hidepassword() also returns bytes and we should deal in bytes as much as possible. This makes test-logexchange.t pass on Python 3.5 Differential Revision: https://phab.mercurial-scm.org/D3127
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 05 Apr 2018 16:56:34 +0530
parents a67fd1fe5109
children de9f9f888900
comparison
equal deleted inserted replaced
37365:1ccd75027abb 37366:b23e3cc1afd4
2862 2862
2863 def removeauth(u): 2863 def removeauth(u):
2864 '''remove all authentication information from a url string''' 2864 '''remove all authentication information from a url string'''
2865 u = url(u) 2865 u = url(u)
2866 u.user = u.passwd = None 2866 u.user = u.passwd = None
2867 return str(u) 2867 return bytes(u)
2868 2868
2869 timecount = unitcountfn( 2869 timecount = unitcountfn(
2870 (1, 1e3, _('%.0f s')), 2870 (1, 1e3, _('%.0f s')),
2871 (100, 1, _('%.1f s')), 2871 (100, 1, _('%.1f s')),
2872 (10, 1, _('%.2f s')), 2872 (10, 1, _('%.2f s')),