Mercurial > hg-stable
comparison hgext/convert/transport.py @ 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 | cb0434795fcd |
children | c5f36402daad |
comparison
equal
deleted
inserted
replaced
8119:af44d0b953c6 | 8120:2b36ed5c1911 |
---|---|
42 svn.client.get_ssl_client_cert_file_provider(pool), | 42 svn.client.get_ssl_client_cert_file_provider(pool), |
43 svn.client.get_ssl_client_cert_pw_file_provider(pool), | 43 svn.client.get_ssl_client_cert_pw_file_provider(pool), |
44 svn.client.get_ssl_server_trust_file_provider(pool), | 44 svn.client.get_ssl_server_trust_file_provider(pool), |
45 ] | 45 ] |
46 # Platform-dependant authentication methods | 46 # Platform-dependant authentication methods |
47 if hasattr(svn.client, 'get_windows_simple_provider'): | 47 getprovider = getattr(svn.core, 'svn_auth_get_platform_specific_provider', |
48 providers.append(svn.client.get_windows_simple_provider(pool)) | 48 None) |
49 if getprovider: | |
50 # Available in svn >= 1.6 | |
51 for name in ('gnome_keyring', 'keychain', 'kwallet', 'windows'): | |
52 for type in ('simple', 'ssl_client_cert_pw', 'ssl_server_trust'): | |
53 p = getprovider(name, type, pool) | |
54 if p: | |
55 providers.append(p) | |
56 else: | |
57 if hasattr(svn.client, 'get_windows_simple_provider'): | |
58 providers.append(svn.client.get_windows_simple_provider(pool)) | |
49 | 59 |
50 return svn.core.svn_auth_open(providers, pool) | 60 return svn.core.svn_auth_open(providers, pool) |
51 | 61 |
52 class NotBranchError(SubversionException): | 62 class NotBranchError(SubversionException): |
53 pass | 63 pass |