comparison mercurial/httprepo.py @ 5193:942c0827dc5b

recognize user:password in URLs that include port numbers. when giving user/pwd in an URL, eg. hg pull http://user:pwd@host.com:666/hg/something, hg would still ask for user/pwd in interactive mode (or fail in non-interactive)
author Peter Meerwald <pmeerw@pmeerw.net>
date Fri, 17 Aug 2007 22:43:38 -0300
parents 167c422c745f
children 86e95b93559a 6e6a00a7bf75
comparison
equal deleted inserted replaced
5179:156f4c8a12aa 5193:942c0827dc5b
251 251
252 passmgr = passwordmgr(ui) 252 passmgr = passwordmgr(ui)
253 if user: 253 if user:
254 ui.debug(_('http auth: user %s, password %s\n') % 254 ui.debug(_('http auth: user %s, password %s\n') %
255 (user, passwd and '*' * len(passwd) or 'not set')) 255 (user, passwd and '*' * len(passwd) or 'not set'))
256 passmgr.add_password(None, host, user, passwd or '') 256 passmgr.add_password(None, self._url, user, passwd or '')
257 257
258 handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr), 258 handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
259 httpdigestauthhandler(passmgr))) 259 httpdigestauthhandler(passmgr)))
260 opener = urllib2.build_opener(*handlers) 260 opener = urllib2.build_opener(*handlers)
261 261