equal
deleted
inserted
replaced
25 from svn.core import SubversionException, Pool |
25 from svn.core import SubversionException, Pool |
26 import svn.ra |
26 import svn.ra |
27 import svn.client |
27 import svn.client |
28 import svn.core |
28 import svn.core |
29 |
29 |
30 # Some older versions of the Python bindings need to be |
30 # Some older versions of the Python bindings need to be |
31 # explicitly initialized. But what we want to do probably |
31 # explicitly initialized. But what we want to do probably |
32 # won't work worth a darn against those libraries anyway! |
32 # won't work worth a darn against those libraries anyway! |
33 svn.ra.initialize() |
33 svn.ra.initialize() |
34 |
34 |
35 svn_config = svn.core.svn_config_get_config(None) |
35 svn_config = svn.core.svn_config_get_config(None) |
73 ab, svn.core.SVN_AUTH_PARAM_DEFAULT_PASSWORD, self.password) |
73 ab, svn.core.SVN_AUTH_PARAM_DEFAULT_PASSWORD, self.password) |
74 self.client.auth_baton = ab |
74 self.client.auth_baton = ab |
75 self.client.config = svn_config |
75 self.client.config = svn_config |
76 try: |
76 try: |
77 self.ra = svn.client.open_ra_session( |
77 self.ra = svn.client.open_ra_session( |
78 self.svn_url.encode('utf8'), |
78 self.svn_url.encode('utf8'), |
79 self.client, self.pool) |
79 self.client, self.pool) |
80 except SubversionException, (_, num): |
80 except SubversionException, (_, num): |
81 if num in (svn.core.SVN_ERR_RA_ILLEGAL_URL, |
81 if num in (svn.core.SVN_ERR_RA_ILLEGAL_URL, |
82 svn.core.SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED, |
82 svn.core.SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED, |
83 svn.core.SVN_ERR_BAD_URL): |
83 svn.core.SVN_ERR_BAD_URL): |