mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg] prompthooks.py fix import readauthforuri for 1.9
readautoforuri was moved to mercurial.httpconnection in 1.9
This commit is contained in:
@@ -176,8 +176,12 @@ def find_user_password(self, realm, authuri):
|
||||
return self.readauthtoken(authuri)
|
||||
else:
|
||||
def read_hgrc_authtoken(ui, authuri):
|
||||
# hg 1.8
|
||||
from mercurial.url import readauthforuri
|
||||
try:
|
||||
# hg 1.8
|
||||
from mercurial.url import readauthforuri
|
||||
except ImportError:
|
||||
# hg 1.9: readauthforuri moved to httpconnection
|
||||
from mercurial.httpconnection import readauthforuri
|
||||
res = readauthforuri(self.ui, authuri)
|
||||
if res:
|
||||
group, auth = res
|
||||
|
||||
Reference in New Issue
Block a user