Changeset 129 for trunk/lib/SVN.h


Ignore:
Timestamp:
Aug 2, 2006, 7:56:18 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses ticket:23. Changed usage of 'svn info' to API calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVN.h

    r123 r129  
    3838namespace svnstat {
    3939
    40   class Directory;
    41 
    4240  ///
    4341  /// If something goes wrong in the use of the SVN class, a
     
    7068    ///
    7169    ~SVN(void);
     70
     71    ///
     72    /// @Brief Call the underlying svn_client_info for \a path with \a
     73    /// receiver and \a baton.
     74    ///
     75    /// This function is called from SVNinfo to do 'svn info' on an
     76    /// item. The \a receiver and \a baton is defined in SVNinfo and
     77    /// the \a receiver is called by the underlying subversion API if
     78    /// \a path is under subversion control. The \a baton is used to
     79    /// communicate anonymous information through the API to the
     80    /// \a receiver.
     81    ///
     82    /// @see Subversion API documentation, SVNinfo
     83    ///
     84    inline void client_info(const std::string& path,
     85                            svn_info_receiver_t receiver, void *baton)
     86    {
     87      if (svn_client_info(path.c_str(), NULL, NULL, receiver, baton, false,
     88                          context_, pool_))
     89        throw SVNException("repository: svn_client_info failed");
     90    }
    7291
    7392    ///
     
    104123
    105124    ///
    106     /// @brief Determine the repository root URL for \a path.
    107     ///
    108     /// @throws SVNException if repository location cannot be
    109     /// determined.
    110     ///
    111     /// @return The repository root URL.
    112     ///
    113     std::string repository(const std::string& path);
    114 
    115     ///
    116125    /// @throws SVNException if session setup fails.
    117126    ///
     
    130139    ///
    131140    vc_status version_controlled(const std::string& path);
     141
    132142
    133143  private:
     
    152162    // Subversion API stuff
    153163
    154     // Info receiver
    155     struct info_receiver_baton {
    156       std::string repos_root_url;
    157     };
    158     static svn_error_t * info_receiver(void *baton, const char *path,
    159                                        const svn_info_t *info, apr_pool_t *pool);
    160 
    161164    // Log message receiver
    162165    struct log_receiver_baton {
Note: See TracChangeset for help on using the changeset viewer.