# HG changeset patch # User Augie Fackler # Date 2018-03-03 19:24:21 # Node ID 6b1eb4c610b4c75facd7d0edf8a9cf34691545b3 # Parent 9318babff83bc17b95c5802cf24092617bd25993 httpconnection: convert url to bytes in readauthforuri This method is sometimes called by the stdlib, so we just need to accept both bytes and unicodes here. Awesome. Differential Revision: https://phab.mercurial-scm.org/D2598 diff --git a/mercurial/httpconnection.py b/mercurial/httpconnection.py --- a/mercurial/httpconnection.py +++ b/mercurial/httpconnection.py @@ -14,6 +14,7 @@ import os from .i18n import _ from . import ( + pycompat, util, ) @@ -62,6 +63,7 @@ class httpsendfile(object): # moved here from url.py to avoid a cycle def readauthforuri(ui, uri, user): + uri = pycompat.bytesurl(uri) # Read configuration groups = {} for key, val in ui.configitems('auth'):