Changeset 123 for trunk/lib/SVN.h


Ignore:
Timestamp:
Jul 30, 2006, 12:42:54 AM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses ticket:23. Removed 'svn log' for revision-date extraction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVN.h

    r91 r123  
    2626
    2727#include <stdexcept>
     28#include <string>
     29#include <vector>
    2830
     31// Jari, most of these can be replaced with forward declarations.
    2932#include <apr_allocator.h>
    3033#include <svn_client.h>
     34#include <svn_ra.h>
    3135#include <svn_wc.h>
    3236
     
    4852  /// SVN provides one single global access point to the underlying
    4953  /// subversion API and makes sure that there is only one point of
    50   /// access to the binary.
     54  /// access for the binary.
    5155  ///
    5256  /// @see Design Patterns (the singleton pattern). Subversion API
     
    6872
    6973    ///
     74    /// @brief Get revision dates.
     75    ///
     76    /// Get dates for all commits to the repository. \a root can be a
     77    /// repository path or a path within a working copy. In the latter
     78    /// case the corresponding repository will be used to retrieve
     79    /// commit dates.
     80    ///
     81    /// @return Revision dates in a vector where revision is
     82    /// implicitly defined by vector index, i.e., element 56 in the
     83    /// resulting vector implies revision 56.
     84    ///
     85    /// @note Currently revision 0 (repositoy creation) is not
     86    /// supported.
     87    ///
     88    /// @throw Various error messages generated from the subversion
     89    /// API.
     90    ///
     91    std::vector<std::string> commit_dates(const std::string& path);
     92
     93    ///
    7094    /// @brief Get an instance of SVN.
    7195    ///
    72     /// @throw Throws a SVNException if one is received from the
    73     /// underlying constructor call.
     96    /// @throw Throws an SVNException if initialization fails in the
     97    /// underlying subversion API calls.
    7498    ///
    7599    /// @todo Make sure that the underlying constructor performs
     
    80104
    81105    ///
    82     /// @throws SCNException if access setup fails.
     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    ///
     116    /// @throws SVNException if session setup fails.
     117    ///
     118    void setup_ra_session(const std::string& path);
     119
     120    ///
     121    /// @throws SVNException if access setup fails.
    83122    ///
    84123    void setup_wc_adm_access(const std::string& path);
     
    111150    static SVN* instance_;
    112151
    113     // subversion API stuff
     152    // Subversion API stuff
     153
     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
     161    // Log message receiver
     162    struct log_receiver_baton {
     163      std::vector<std::string> commit_dates;
     164    };
     165    static svn_error_t *
     166    log_message_receiver(void *baton, apr_hash_t *changed_paths,
     167                         svn_revnum_t rev, const char *author, const char *date,
     168                         const char *msg, apr_pool_t *pool);
     169
    114170    svn_wc_adm_access_t* adm_access_;
    115171    apr_allocator_t* allocator_;
    116172    svn_client_ctx_t* context_;
    117173    apr_pool_t* pool_;
     174    svn_ra_session_t* ra_session_;
    118175  };
    119176
Note: See TracChangeset for help on using the changeset viewer.