Changeset 501 for trunk/lib/SVN.cc


Ignore:
Timestamp:
Oct 19, 2007, 9:14:45 PM (14 years ago)
Author:
Peter Johansson
Message:

added function calling svn blame for specific revision. refs #24.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVN.cc

    r439 r501  
    146146  svn_error_t* SVN::client_blame(const std::string& path,
    147147                                 svn_client_blame_receiver_t receiver,
     148                                 void *baton, svn_revnum_t rev)
     149  {
     150    svn_opt_revision_t head;
     151    head.kind=svn_opt_revision_number;
     152    head.value.number=rev;
     153    return client_blame_call(path, receiver, baton, head);
     154  }
     155
     156  svn_error_t* SVN::client_blame(const std::string& path,
     157                                 svn_client_blame_receiver_t receiver,
    148158                                 void *baton)
    149159  {
     160    svn_opt_revision_t head;
     161    head.kind = ( svn_path_is_url(path.c_str()) ?
     162                  svn_opt_revision_head : svn_opt_revision_base );
     163    return client_blame_call(path, receiver, baton, head);
     164  }
     165
     166
     167  svn_error_t* SVN::client_blame_call(const std::string& path,
     168                                      svn_client_blame_receiver_t receiver,
     169                                      void *baton, svn_opt_revision_t& head)
     170  {
    150171    // Setup to use all revisions
    151     svn_opt_revision_t peg, start, head;
     172    svn_opt_revision_t peg, start;
    152173    peg.kind=svn_opt_revision_unspecified;
    153174    start.kind=svn_opt_revision_number;
    154175    start.value.number=0;
    155     head.kind = ( svn_path_is_url(path.c_str()) ?
    156                   svn_opt_revision_head : svn_opt_revision_base );
    157176    apr_pool_t *subpool = svn_pool_create(pool_);
    158177    svn_error_t* err=svn_client_blame3(path.c_str(), &peg, &start, &head,
Note: See TracChangeset for help on using the changeset viewer.