@ -53,7 +53,7 @@
# include "svn.h"
# include "svn.h"
# include <apr_portable.h>
# include <apr_portable.h>
using namespace K IO;
using namespace TDE IO;
typedef struct
typedef struct
{
{
@ -125,14 +125,14 @@ kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &
svn_error_t * err = svn_client_create_context ( & ctx , pool ) ;
svn_error_t * err = svn_client_create_context ( & ctx , pool ) ;
if ( err ) {
if ( err ) {
kdDebug ( 7128 ) < < " kio_svnProtocol::kio_svnProtocol() create_context ERROR " < < endl ;
kdDebug ( 7128 ) < < " kio_svnProtocol::kio_svnProtocol() create_context ERROR " < < endl ;
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
return ;
return ;
}
}
err = svn_config_ensure ( NULL , pool ) ;
err = svn_config_ensure ( NULL , pool ) ;
if ( err ) {
if ( err ) {
kdDebug ( 7128 ) < < " kio_svnProtocol::kio_svnProtocol() configensure ERROR " < < endl ;
kdDebug ( 7128 ) < < " kio_svnProtocol::kio_svnProtocol() configensure ERROR " < < endl ;
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
return ;
return ;
}
}
svn_config_get_config ( & ctx - > config , NULL , pool ) ;
svn_config_get_config ( & ctx - > config , NULL , pool ) ;
@ -272,7 +272,7 @@ void kio_svnProtocol::get(const KURL& url ){
svn_error_t * err = svn_client_cat ( bt - > string_stream , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , ctx , subpool ) ;
svn_error_t * err = svn_client_cat ( bt - > string_stream , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
return ;
return ;
}
}
@ -439,7 +439,7 @@ void kio_svnProtocol::listDir(const KURL& url){
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_ls ( & dirents , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , false , ctx , subpool ) ;
svn_error_t * err = svn_client_ls ( & dirents , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , false , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
return ;
return ;
}
}
@ -490,23 +490,23 @@ bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString&
kdDebug ( 7128 ) < < " MTime : " < < ( long ) mtime < < endl ;
kdDebug ( 7128 ) < < " MTime : " < < ( long ) mtime < < endl ;
kdDebug ( 7128 ) < < " UDS filename : " < < filename < < endl ;
kdDebug ( 7128 ) < < " UDS filename : " < < filename < < endl ;
UDSAtom atom ;
UDSAtom atom ;
atom . m_uds = K IO: : UDS_NAME ;
atom . m_uds = TDE IO: : UDS_NAME ;
atom . m_str = filename ;
atom . m_str = filename ;
entry . append ( atom ) ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_FILE_TYPE ;
atom . m_uds = TDE IO: : UDS_FILE_TYPE ;
atom . m_long = isdir ? S_IFDIR : S_IFREG ;
atom . m_long = isdir ? S_IFDIR : S_IFREG ;
entry . append ( atom ) ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_SIZE ;
atom . m_uds = TDE IO: : UDS_SIZE ;
atom . m_long = size ;
atom . m_long = size ;
entry . append ( atom ) ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_MODIFICATION_TIME ;
atom . m_uds = TDE IO: : UDS_MODIFICATION_TIME ;
atom . m_long = mtime ;
atom . m_long = mtime ;
entry . append ( atom ) ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_USER ;
atom . m_uds = TDE IO: : UDS_USER ;
atom . m_str = user ;
atom . m_str = user ;
entry . append ( atom ) ;
entry . append ( atom ) ;
@ -552,7 +552,7 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_copy ( & commit_info , srcsvn . utf8 ( ) , & rev , destsvn . utf8 ( ) , ctx , subpool ) ;
svn_error_t * err = svn_client_copy ( & commit_info , srcsvn . utf8 ( ) , & rev , destsvn . utf8 ( ) , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
}
}
finished ( ) ;
finished ( ) ;
@ -580,7 +580,7 @@ void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_mkdir ( & commit_info , targets , ctx , subpool ) ;
svn_error_t * err = svn_client_mkdir ( & commit_info , targets , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_COULD_NOT_MKDIR , err - > message ) ;
error ( TDE IO: : ERR_COULD_NOT_MKDIR , err - > message ) ;
}
}
finished ( ) ;
finished ( ) ;
@ -603,7 +603,7 @@ void kio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_mkdir ( & commit_info , targets , ctx , subpool ) ;
svn_error_t * err = svn_client_mkdir ( & commit_info , targets , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_COULD_NOT_MKDIR , err - > message ) ;
error ( TDE IO: : ERR_COULD_NOT_MKDIR , err - > message ) ;
}
}
finished ( ) ;
finished ( ) ;
@ -626,7 +626,7 @@ void kio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_delete ( & commit_info , targets , false /*force remove locally modified files in wc*/ , ctx , subpool ) ;
svn_error_t * err = svn_client_delete ( & commit_info , targets , false /*force remove locally modified files in wc*/ , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_CANNOT_DELETE , err - > message ) ;
error ( TDE IO: : ERR_CANNOT_DELETE , err - > message ) ;
}
}
finished ( ) ;
finished ( ) ;
@ -672,7 +672,7 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_move ( & commit_info , srcsvn . utf8 ( ) , & rev , destsvn . utf8 ( ) , false /*force remove locally modified files in wc*/ , ctx , subpool ) ;
svn_error_t * err = svn_client_move ( & commit_info , srcsvn . utf8 ( ) , & rev , destsvn . utf8 ( ) , false /*force remove locally modified files in wc*/ , ctx , subpool ) ;
if ( err ) {
if ( err ) {
error ( K IO: : ERR_CANNOT_RENAME , err - > message ) ;
error ( TDE IO: : ERR_CANNOT_RENAME , err - > message ) ;
}
}
finished ( ) ;
finished ( ) ;
@ -935,7 +935,7 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_diff ( options , path1 , & revision1 , path2 , & revision2 , recurse , false , true , outfile , NULL , ctx , subpool ) ;
svn_error_t * err = svn_client_diff ( options , path1 , & revision1 , path2 , & revision2 , recurse , false , true , outfile , NULL , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
//read the content of the outfile now
//read the content of the outfile now
TQStringList tmp ;
TQStringList tmp ;
apr_file_close ( outfile ) ;
apr_file_close ( outfile ) ;
@ -981,7 +981,7 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_switch ( NULL /*result revision*/ , path , url , & rev , recurse , ctx , subpool ) ;
svn_error_t * err = svn_client_switch ( NULL /*result revision*/ , path , url , & rev , recurse , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1001,7 +1001,7 @@ void kio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& rev
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_update ( NULL , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , true , ctx , subpool ) ;
svn_error_t * err = svn_client_update ( NULL , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , & rev , true , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1029,7 +1029,7 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_import ( & commit_info , path , url , nonrecursive , ctx , subpool ) ;
svn_error_t * err = svn_client_import ( & commit_info , path , url , nonrecursive , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1053,7 +1053,7 @@ void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber
initNotifier ( true , false , false , subpool ) ;
initNotifier ( true , false , false , subpool ) ;
svn_error_t * err = svn_client_checkout ( NULL /* rev actually checkedout */ , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , svn_path_canonicalize ( dpath . utf8 ( ) , subpool ) , & rev , true , ctx , subpool ) ;
svn_error_t * err = svn_client_checkout ( NULL /* rev actually checkedout */ , svn_path_canonicalize ( target . utf8 ( ) , subpool ) , svn_path_canonicalize ( dpath . utf8 ( ) , subpool ) , & rev , true , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1078,7 +1078,7 @@ void kio_svnProtocol::commit(const KURL::List& wc) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_commit ( & commit_info , targets , nonrecursive , ctx , subpool ) ;
svn_error_t * err = svn_client_commit ( & commit_info , targets , nonrecursive , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
if ( commit_info ) {
if ( commit_info ) {
for ( TQValueListConstIterator < KURL > it = wc . begin ( ) ; it ! = wc . end ( ) ; + + it ) {
for ( TQValueListConstIterator < KURL > it = wc . begin ( ) ; it ! = wc . end ( ) ; + + it ) {
@ -1118,7 +1118,7 @@ void kio_svnProtocol::add(const KURL& wc) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_add ( svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , nonrecursive , ctx , subpool ) ;
svn_error_t * err = svn_client_add ( svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , nonrecursive , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1144,7 +1144,7 @@ void kio_svnProtocol::wc_delete(const KURL::List& wc) {
svn_error_t * err = svn_client_delete ( & commit_info , targets , nonrecursive , ctx , subpool ) ;
svn_error_t * err = svn_client_delete ( & commit_info , targets , nonrecursive , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1168,7 +1168,7 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_revert ( targets , nonrecursive , ctx , subpool ) ;
svn_error_t * err = svn_client_revert ( targets , nonrecursive , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1192,7 +1192,7 @@ void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurs
svn_error_t * err = svn_client_status ( & result_rev , svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , & rev , kio_svnProtocol : : status , this , fullRecurse , getAll , checkRepos , no_ignore , ctx , subpool ) ;
svn_error_t * err = svn_client_status ( & result_rev , svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , & rev , kio_svnProtocol : : status , this , fullRecurse , getAll , checkRepos , no_ignore , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;
@ -1565,7 +1565,7 @@ void kio_svnProtocol::wc_resolve( const KURL& wc, bool recurse ) {
initNotifier ( false , false , false , subpool ) ;
initNotifier ( false , false , false , subpool ) ;
svn_error_t * err = svn_client_resolved ( svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , recurse , ctx , subpool ) ;
svn_error_t * err = svn_client_resolved ( svn_path_canonicalize ( nurl . path ( ) . utf8 ( ) , subpool ) , recurse , ctx , subpool ) ;
if ( err )
if ( err )
error ( K IO: : ERR_SLAVE_DEFINED , err - > message ) ;
error ( TDE IO: : ERR_SLAVE_DEFINED , err - > message ) ;
finished ( ) ;
finished ( ) ;
svn_pool_destroy ( subpool ) ;
svn_pool_destroy ( subpool ) ;