Patchwork D3127: py3: return bytes from util.removeauth()

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:31 p.m.
Message ID <differential-rev-PHID-DREV-ke423tla47i7tbstlbl4-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30355/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 12:31 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2864,7 +2864,7 @@ 
     '''remove all authentication information from a url string'''
     u = url(u)
     u.user = u.passwd = None
-    return str(u)
+    return bytes(u)
 
 timecount = unitcountfn(
     (1, 1e3, _('%.0f s')),