equal
deleted
inserted
replaced
26 |
26 |
27 Pool = svn.core.Pool |
27 Pool = svn.core.Pool |
28 SubversionException = svn.core.SubversionException |
28 SubversionException = svn.core.SubversionException |
29 |
29 |
30 from mercurial.pycompat import getattr |
30 from mercurial.pycompat import getattr |
31 from mercurial import util |
|
32 |
31 |
33 # Some older versions of the Python bindings need to be |
32 # Some older versions of the Python bindings need to be |
34 # explicitly initialized. But what we want to do probably |
33 # explicitly initialized. But what we want to do probably |
35 # won't work worth a darn against those libraries anyway! |
34 # won't work worth a darn against those libraries anyway! |
36 svn.ra.initialize() |
35 svn.ra.initialize() |
61 for type in (b'simple', b'ssl_client_cert_pw', b'ssl_server_trust'): |
60 for type in (b'simple', b'ssl_client_cert_pw', b'ssl_server_trust'): |
62 p = getprovider(name, type, pool) |
61 p = getprovider(name, type, pool) |
63 if p: |
62 if p: |
64 providers.append(p) |
63 providers.append(p) |
65 else: |
64 else: |
66 if util.safehasattr(svn.client, 'get_windows_simple_provider'): |
65 if hasattr(svn.client, 'get_windows_simple_provider'): |
67 providers.append(svn.client.get_windows_simple_provider(pool)) |
66 providers.append(svn.client.get_windows_simple_provider(pool)) |
68 |
67 |
69 return svn.core.svn_auth_open(providers, pool) |
68 return svn.core.svn_auth_open(providers, pool) |
70 |
69 |
71 |
70 |
83 self.svn_url = url |
82 self.svn_url = url |
84 self.username = b'' |
83 self.username = b'' |
85 self.password = b'' |
84 self.password = b'' |
86 |
85 |
87 # Only Subversion 1.4 has reparent() |
86 # Only Subversion 1.4 has reparent() |
88 if ra is None or not util.safehasattr(svn.ra, 'reparent'): |
87 if ra is None or not hasattr(svn.ra, 'reparent'): |
89 self.client = svn.client.create_context(self.pool) |
88 self.client = svn.client.create_context(self.pool) |
90 ab = _create_auth_baton(self.pool) |
89 ab = _create_auth_baton(self.pool) |
91 self.client.auth_baton = ab |
90 self.client.auth_baton = ab |
92 global svn_config |
91 global svn_config |
93 if svn_config is None: |
92 if svn_config is None: |