changeset 15028:eb97a3e38656

http: explain why the host is passed to urllib2 password manager The original comment was in url.getauthinfo() and was lost in bf6156bab41b.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 06 Aug 2011 14:10:59 +0200
parents 1e45b92f4fb2
children d5f774668102
files mercurial/util.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 ''))