Show More
@@ -12,13 +12,13 b' from demandload import *' | |||
|
12 | 12 | demandload(globals(), "hg os urllib urllib2 urlparse zlib util httplib") |
|
13 | 13 | demandload(globals(), "keepalive") |
|
14 | 14 | |
|
15 | class passwordmgr(urllib2.HTTPPasswordMgr): | |
|
15 | class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm): | |
|
16 | 16 | def __init__(self, ui): |
|
17 | urllib2.HTTPPasswordMgr.__init__(self) | |
|
17 | urllib2.HTTPPasswordMgrWithDefaultRealm.__init__(self) | |
|
18 | 18 | self.ui = ui |
|
19 | 19 | |
|
20 | 20 | def find_user_password(self, realm, authuri): |
|
21 | authinfo = urllib2.HTTPPasswordMgr.find_user_password( | |
|
21 | authinfo = urllib2.HTTPPasswordMgrWithDefaultRealm.find_user_password( | |
|
22 | 22 | self, realm, authuri) |
|
23 | 23 | if authinfo != (None, None): |
|
24 | 24 | return authinfo |
@@ -133,7 +133,8 b' class httprepository(remoterepository):' | |||
|
133 | 133 | |
|
134 | 134 | passmgr = passwordmgr(ui) |
|
135 | 135 | if user: |
|
136 |
ui.debug(_('will use user %s for http auth\n') % |
|
|
136 | ui.debug(_('will use user %s, password %s for http auth\n') % | |
|
137 | (user, '*' * len(passwd))) | |
|
137 | 138 | passmgr.add_password(None, host, user, passwd or '') |
|
138 | 139 | |
|
139 | 140 | opener = urllib2.build_opener( |
General Comments 0
You need to be logged in to leave comments.
Login now