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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Apr 5 12:31:49 UTC 2018


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

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')),



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


More information about the Mercurial-devel mailing list