Logo Search packages:      
Sourcecode: hgsubversion version File versions  Download package

def hgsubversion::svnwrap::svn_swig_wrapper::SubversionRepo::list_files (   self,
  dirpath,
  revision 
)
List the content of a directory at a given revision, recursively.

Yield tuples (path, kind) where 'path' is the entry path relatively to
'dirpath' and 'kind' is 'f' if the entry is a file, 'd' if it is a
directory. Raise IOError if the directory cannot be found at given
revision.

Definition at line 525 of file svn_swig_wrapper.py.

                                           :
        """List the content of a directory at a given revision, recursively.

        Yield tuples (path, kind) where 'path' is the entry path relatively to
        'dirpath' and 'kind' is 'f' if the entry is a file, 'd' if it is a
        directory. Raise IOError if the directory cannot be found at given
        revision.
        """
        rpath = self.path2url(dirpath)
        pool = core.Pool()
        rev = optrev(revision)
        try:
            entries = client.ls(rpath, rev, True, self.client_context, pool)
        except SubversionException, e:
            if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
                raise IOError(errno.ENOENT,
                              '%s cannot be found at r%d' % (dirpath, revision))
            raise
        for path, e in entries.iteritems():
            kind = _svntypes.get(e.kind)
            yield path, kind


Generated by  Doxygen 1.6.0   Back to index