Changeset 501
- Timestamp:
- Oct 19, 2007, 9:14:45 PM (15 years ago)
- Location:
- trunk/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/SVN.cc
r439 r501 146 146 svn_error_t* SVN::client_blame(const std::string& path, 147 147 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, 148 158 void *baton) 149 159 { 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 { 150 171 // Setup to use all revisions 151 svn_opt_revision_t peg, start , head;172 svn_opt_revision_t peg, start; 152 173 peg.kind=svn_opt_revision_unspecified; 153 174 start.kind=svn_opt_revision_number; 154 175 start.value.number=0; 155 head.kind = ( svn_path_is_url(path.c_str()) ?156 svn_opt_revision_head : svn_opt_revision_base );157 176 apr_pool_t *subpool = svn_pool_create(pool_); 158 177 svn_error_t* err=svn_client_blame3(path.c_str(), &peg, &start, &head, -
trunk/lib/SVN.h
r439 r501 103 103 104 104 /** 105 \brief Same as function above with the extension that revision 106 \a rev can be set. 107 */ 108 svn_error_t * client_blame(const std::string& path, 109 svn_client_blame_receiver_t receiver, 110 void *baton, svn_revnum_t rev); 111 112 /** 105 113 \brief Call the underlying svn_client_info for \a path with \a 106 114 receiver and \a baton. … … 262 270 apr_pool_t *pool); 263 271 272 svn_error_t* client_blame_call(const std::string& path, 273 svn_client_blame_receiver_t receiver, 274 void *baton, svn_opt_revision_t& head); 275 264 276 svn_wc_adm_access_t* adm_access_; 265 277 apr_allocator_t* allocator_; -
trunk/lib/SVNblame.cc
r492 r501 38 38 instance_->client_blame(path.c_str(), blame_receiver, 39 39 static_cast<void*>(&blame_receiver_baton_))) { 40 // SVN_ERR_CLIENT_IS_BINARY_FILE is the only error allowed to 41 // escape the client_blame call 42 svn_error_clear(err); 43 binary_=true; 44 } 45 blame_info_iterator_ = blame_receiver_baton_.blame_info.begin(); 46 } 47 48 49 SVNblame::SVNblame(const std::string& path, svn_revnum_t rev) 50 : binary_(false), instance_(SVN::instance()) 51 { 52 if (svn_error_t* err= 53 instance_->client_blame(path.c_str(), blame_receiver, 54 static_cast<void*>(&blame_receiver_baton_), 55 rev)) { 40 56 // SVN_ERR_CLIENT_IS_BINARY_FILE is the only error allowed to 41 57 // escape the client_blame call -
trunk/lib/SVNblame.h
r439 r501 54 54 */ 55 55 explicit SVNblame(const std::string& path); 56 57 /** 58 @brief The contructor. 59 60 The constructor performs an 'svn blame -r rev' on \a path and 61 initializes the SVNblame object for statistics traversal using 62 SVNblame::next_line() and SVNblame::valid(). 63 */ 64 SVNblame(const std::string& path, svn_revnum_t rev); 56 65 57 66 /**
Note: See TracChangeset
for help on using the changeset viewer.