diff options
Diffstat (limited to 'subversion/bindings/ctypes-python/csvn/repos.py')
-rw-r--r-- | subversion/bindings/ctypes-python/csvn/repos.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/subversion/bindings/ctypes-python/csvn/repos.py b/subversion/bindings/ctypes-python/csvn/repos.py index e1df253..eead467 100644 --- a/subversion/bindings/ctypes-python/csvn/repos.py +++ b/subversion/bindings/ctypes-python/csvn/repos.py @@ -67,6 +67,10 @@ class RepositoryURI(object): return self._as_parameter_ class RemoteRepository(object): + """This class represents a connection from the client to a remote + Subversion repository.""" + # The interface corresponds roughly to the svn_ra API, and an object of + # this type basically represents the C type 'svn_ra_session_t'. def __init__(self, url, user=None): """Open a new session to URL with the specified USER. @@ -150,7 +154,12 @@ class RemoteRepository(object): svn_ra_get_dir2(self, dirents.byref(), NULL, NULL, path, rev, fields, dirents.pool) self.iterpool.clear() - return dirents + # Create a Python dict of svn_dirent_t objects from this Hash of + # pointers to svn_dirent_t. + result = {} + for path, dirent_p in dirents.items(): + result[path] = dirent_p[0] + return result def cat(self, buffer, path, rev = SVN_INVALID_REVNUM): """Get PATH@REV and save it to BUFFER. BUFFER must be a Python file @@ -174,7 +183,7 @@ class RemoteRepository(object): rev = self.latest_revnum() svn_ra_stat(self, path, rev, byref(dirent), dirent.pool) self.iterpool.clear() - return dirent + return dirent[0] def proplist(self, path, rev = SVN_INVALID_REVNUM): """Return a dictionary containing the properties on PATH@REV |