# HG changeset patch # User Patrick Mezard # Date 1312632659 -7200 # Node ID eb97a3e3865600abc582c70cc364c2bff0e07c3f # Parent 1e45b92f4fb2b6ebfa99624977febde167c01345 http: explain why the host is passed to urllib2 password manager The original comment was in url.getauthinfo() and was lost in bf6156bab41b. diff -r 1e45b92f4fb2 -r eb97a3e38656 mercurial/util.py --- a/mercurial/util.py Fri Aug 05 16:07:51 2011 -0500 +++ b/mercurial/util.py Sat Aug 06 14:10:59 2011 +0200 @@ -1589,8 +1589,10 @@ self.user, self.passwd = user, passwd if not self.user: return (s, None) - # authinfo[1] is passed to urllib2 password manager, and its URIs - # must not contain credentials. + # authinfo[1] is passed to urllib2 password manager, and its + # URIs must not contain credentials. The host is passed in the + # URIs list because Python < 2.4.3 uses only that to search for + # a password. return (s, (None, (s, self.host), self.user, self.passwd or ''))