http: explain why the host is passed to urllib2 password manager
The original comment was in url.getauthinfo() and was lost in
bf6156bab41b.
--- 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 ''))