Mercurial > hg
changeset 8120:2b36ed5c1911
convert/svn: support more OS specific auth providers via svn 1.6 API
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 22 Apr 2009 23:13:39 +0200 |
parents | af44d0b953c6 |
children | aef8b864a304 |
files | hgext/convert/transport.py |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/transport.py Wed Apr 22 17:15:59 2009 +0200 +++ b/hgext/convert/transport.py Wed Apr 22 23:13:39 2009 +0200 @@ -44,8 +44,18 @@ 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)