mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
convert/svn: support more OS specific auth providers via svn 1.6 API
This commit is contained in:
parent
85e0e5f5fa
commit
e893f02e4f
@ -44,8 +44,18 @@ def _create_auth_baton(pool):
|
||||
svn.client.get_ssl_server_trust_file_provider(pool),
|
||||
]
|
||||
# Platform-dependant authentication methods
|
||||
if hasattr(svn.client, 'get_windows_simple_provider'):
|
||||
providers.append(svn.client.get_windows_simple_provider(pool))
|
||||
getprovider = getattr(svn.core, 'svn_auth_get_platform_specific_provider',
|
||||
None)
|
||||
if getprovider:
|
||||
# Available in svn >= 1.6
|
||||
for name in ('gnome_keyring', 'keychain', 'kwallet', 'windows'):
|
||||
for type in ('simple', 'ssl_client_cert_pw', 'ssl_server_trust'):
|
||||
p = getprovider(name, type, pool)
|
||||
if p:
|
||||
providers.append(p)
|
||||
else:
|
||||
if hasattr(svn.client, 'get_windows_simple_provider'):
|
||||
providers.append(svn.client.get_windows_simple_provider(pool))
|
||||
|
||||
return svn.core.svn_auth_open(providers, pool)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user