- Timestamp:
- Mar 18, 2008, 2:11:36 PM (15 years ago)
- Location:
- branches/0.6-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.6-stable/bin/svndigest.cc
r486 r573 96 96 } 97 97 catch (SVNException e) { 98 std::cerr << "\nsvndigest: " << e.what() 99 << "\nsvndigest: failed to initilize subversion access for " 100 << option->root() << std::endl; 98 std::cerr << "svndigest: " << e.what() << "\n"; 101 99 exit(-1); 102 100 } -
branches/0.6-stable/lib/SVN.cc
r572 r573 98 98 // setup, maybe this is unnecessary? 99 99 const char* canonical_path=svn_path_internal_style(path.c_str(), pool_); 100 if (svn_error_t *err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path, 101 false, -1, context_->cancel_func, 102 context_->cancel_baton, pool_)) 100 if ((err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path, 101 false, -1, context_->cancel_func, 102 context_->cancel_baton, pool_))){ 103 if (err->apr_err == SVN_ERR_WC_NOT_DIRECTORY) 104 cleanup_failed_init(err, std::string(err->message), true); 103 105 cleanup_failed_init(err, "SVN: svn_wc_adm_open3 failed"); 106 } 104 107 105 108 // get a session to the repository 106 109 struct root_url_receiver_baton rurb; 107 110 client_info(path, root_url_receiver, static_cast<void*>(&rurb)); 108 if ( svn_error_t *err=svn_client_open_ra_session(&ra_session_,109 110 context_, pool_))111 if ((err=svn_client_open_ra_session(&ra_session_, 112 rurb.path.c_str(), 113 context_, pool_))) 111 114 cleanup_failed_init(err, "SVN: svn_client_open_ra_session failed"); 112 115 } … … 125 128 126 129 void SVN::cleanup(svn_error_t *err,apr_pool_t *pool, 127 const std::string& message) 128 { 129 svn_handle_error2(err,stderr,false,"svndigest: "); 130 std::string message, bool mute) 131 { 132 if (!mute) 133 svn_handle_error2(err,stderr,false,"svndigest: "); 130 134 svn_error_clear(err); 131 135 if (pool){ … … 138 142 139 143 140 void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message) 141 { 142 cleanup(err,pool_); 144 void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message, 145 bool mute) 146 { 147 cleanup(err,pool_, "", true); 143 148 throw SVNException(message); 144 149 } -
branches/0.6-stable/lib/SVN.h
r430 r573 203 203 /// 204 204 SVN(const SVN&); 205 SVN& operator=(const SVN&); 205 206 206 207 /// … … 214 215 This function will write an error message to stdout, free \a 215 216 err and \a pool resources. If \a err or \a pool are a NULL 216 pointers the function will do nothing with these resources. 217 pointers the function will do nothing with these resources. If 218 \a mute is true, no error message is written. 217 219 218 220 cleanup will throw a SVNException if \a message has … … 223 225 */ 224 226 void cleanup(svn_error_t *err, apr_pool_t *pool, 225 const std::string& message=std::string());227 std::string message=std::string(), bool mute=false); 226 228 227 229 /** … … 235 237 @see SVNException 236 238 */ 237 void cleanup_failed_init(svn_error_t *err, const std::string& message); 239 void cleanup_failed_init(svn_error_t *err, const std::string& message, 240 bool mute=false); 238 241 239 242 static SVN* instance_;
Note: See TracChangeset
for help on using the changeset viewer.