##// END OF EJS Templates
Handle httpconnection.readauthforuri changes (hg.0593e8f81c71)
Patrick Mezard -
r81:049fac04 default
parent child Browse files
Show More
@@ -120,7 +120,7 b' class HTTPPasswordHandler(object):'
120
120
121 # Loading .hg/hgrc [auth] section contents. If prefix is given,
121 # Loading .hg/hgrc [auth] section contents. If prefix is given,
122 # it will be used as a key to lookup password in the keyring.
122 # it will be used as a key to lookup password in the keyring.
123 auth_user, pwd, prefix_url = self.load_hgrc_auth(ui, base_url)
123 auth_user, pwd, prefix_url = self.load_hgrc_auth(ui, base_url, user)
124 if prefix_url:
124 if prefix_url:
125 keyring_url = prefix_url
125 keyring_url = prefix_url
126 else:
126 else:
@@ -197,7 +197,7 b' class HTTPPasswordHandler(object):'
197 self.last_reply = dict(realm=realm,authuri=authuri,user=user)
197 self.last_reply = dict(realm=realm,authuri=authuri,user=user)
198 return user, pwd
198 return user, pwd
199
199
200 def load_hgrc_auth(self, ui, base_url):
200 def load_hgrc_auth(self, ui, base_url, user):
201 """
201 """
202 Loading [auth] section contents from local .hgrc
202 Loading [auth] section contents from local .hgrc
203
203
@@ -241,7 +241,11 b' class HTTPPasswordHandler(object):'
241 # hg 1.9
241 # hg 1.9
242 import mercurial.httpconnection
242 import mercurial.httpconnection
243 readauthforuri = mercurial.httpconnection.readauthforuri
243 readauthforuri = mercurial.httpconnection.readauthforuri
244 res = readauthforuri(local_ui, base_url)
244 if readauthforuri.func_code.co_argcount == 3:
245 # Since hg.0593e8f81c71
246 res = readauthforuri(local_ui, base_url, user)
247 else:
248 res = readauthforuri(local_ui, base_url)
245 if res:
249 if res:
246 group, auth_token = res
250 group, auth_token = res
247 else:
251 else:
General Comments 0
You need to be logged in to leave comments. Login now