##// END OF EJS Templates
passwordmgr.readauthtoken() has been moved into a utility function
Steve Borho -
r69:131b19eb default
parent child Browse files
Show More
@@ -229,8 +229,17 b' class HTTPPasswordHandler(object):'
229 local_ui = _ui(ui)
229 local_ui = _ui(ui)
230 if repo_root:
230 if repo_root:
231 local_ui.readconfig(os.path.join(repo_root, ".hg", "hgrc"))
231 local_ui.readconfig(os.path.join(repo_root, ".hg", "hgrc"))
232 local_passwordmgr = passwordmgr(local_ui)
232 try:
233 auth_token = local_passwordmgr.readauthtoken(base_url)
233 local_passwordmgr = passwordmgr(local_ui)
234 auth_token = local_passwordmgr.readauthtoken(base_url)
235 except AttributeError:
236 # hg 1.8
237 from mercurial.url import readauthforuri
238 res = readauthforuri(local_ui, base_url)
239 if res:
240 group, auth_token = res
241 else:
242 auth_token = None
234 if auth_token:
243 if auth_token:
235 username = auth_token.get('username')
244 username = auth_token.get('username')
236 password = auth_token.get('password')
245 password = auth_token.get('password')
General Comments 0
You need to be logged in to leave comments. Login now