|
|
@ -111,9 +111,9 @@ compare_items_as_paths (const svn_sort__item_t*a, const svn_sort__item_t*b) {
|
|
|
|
return svn_path_compare_paths ((const char *)a->key, (const char *)b->key);
|
|
|
|
return svn_path_compare_paths ((const char *)a->key, (const char *)b->key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket)
|
|
|
|
tdeio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket)
|
|
|
|
: SlaveBase("kio_svn", pool_socket, app_socket) {
|
|
|
|
: SlaveBase("tdeio_svn", pool_socket, app_socket) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::kio_svnProtocol()" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::kio_svnProtocol()" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
m_counter = 0;
|
|
|
|
m_counter = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -124,20 +124,20 @@ 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) << "tdeio_svnProtocol::kio_svnProtocol() create_context ERROR" << endl;
|
|
|
|
error( TDEIO::ERR_SLAVE_DEFINED, err->message );
|
|
|
|
error( TDEIO::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) << "tdeio_svnProtocol::kio_svnProtocol() configensure ERROR" << endl;
|
|
|
|
error( TDEIO::ERR_SLAVE_DEFINED, err->message );
|
|
|
|
error( TDEIO::ERR_SLAVE_DEFINED, err->message );
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
svn_config_get_config (&ctx->config, NULL, pool);
|
|
|
|
svn_config_get_config (&ctx->config, NULL, pool);
|
|
|
|
|
|
|
|
|
|
|
|
ctx->log_msg_func = kio_svnProtocol::commitLogPrompt;
|
|
|
|
ctx->log_msg_func = tdeio_svnProtocol::commitLogPrompt;
|
|
|
|
ctx->log_msg_baton = this; //pass this so that we can get a dcopClient from it
|
|
|
|
ctx->log_msg_baton = this; //pass this so that we can get a dcopClient from it
|
|
|
|
//TODO
|
|
|
|
//TODO
|
|
|
|
ctx->cancel_func = NULL;
|
|
|
|
ctx->cancel_func = NULL;
|
|
|
@ -169,25 +169,25 @@ kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
|
|
|
|
|
|
|
|
//SSL interactive prompt, where things get hard
|
|
|
|
//SSL interactive prompt, where things get hard
|
|
|
|
svn_client_get_ssl_server_trust_prompt_provider (&provider, kio_svnProtocol::trustSSLPrompt, NULL, pool);
|
|
|
|
svn_client_get_ssl_server_trust_prompt_provider (&provider, tdeio_svnProtocol::trustSSLPrompt, NULL, pool);
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
svn_client_get_ssl_client_cert_prompt_provider (&provider, kio_svnProtocol::clientCertSSLPrompt, NULL, 2, pool);
|
|
|
|
svn_client_get_ssl_client_cert_prompt_provider (&provider, tdeio_svnProtocol::clientCertSSLPrompt, NULL, 2, pool);
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
svn_client_get_ssl_client_cert_pw_prompt_provider (&provider, kio_svnProtocol::clientCertPasswdPrompt, NULL, 2, pool);
|
|
|
|
svn_client_get_ssl_client_cert_pw_prompt_provider (&provider, tdeio_svnProtocol::clientCertPasswdPrompt, NULL, 2, pool);
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
|
|
|
|
|
|
|
|
|
|
|
|
svn_auth_open(&ctx->auth_baton, providers, pool);
|
|
|
|
svn_auth_open(&ctx->auth_baton, providers, pool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kio_svnProtocol::~kio_svnProtocol(){
|
|
|
|
tdeio_svnProtocol::~kio_svnProtocol(){
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::~kio_svnProtocol()" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::~kio_svnProtocol()" << endl;
|
|
|
|
svn_pool_destroy(pool);
|
|
|
|
svn_pool_destroy(pool);
|
|
|
|
apr_terminate();
|
|
|
|
apr_terminate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::initNotifier(bool is_checkout, bool is_export, bool suppress_final_line, apr_pool_t *spool) {
|
|
|
|
void tdeio_svnProtocol::initNotifier(bool is_checkout, bool is_export, bool suppress_final_line, apr_pool_t *spool) {
|
|
|
|
m_counter=0;//reset counter
|
|
|
|
m_counter=0;//reset counter
|
|
|
|
ctx->notify_func = kio_svnProtocol::notify;
|
|
|
|
ctx->notify_func = tdeio_svnProtocol::notify;
|
|
|
|
struct notify_baton *nb = ( struct notify_baton* )apr_palloc(spool, sizeof( *nb ) );
|
|
|
|
struct notify_baton *nb = ( struct notify_baton* )apr_palloc(spool, sizeof( *nb ) );
|
|
|
|
nb->master = this;
|
|
|
|
nb->master = this;
|
|
|
|
nb->received_some_change = FALSE;
|
|
|
|
nb->received_some_change = FALSE;
|
|
|
@ -202,9 +202,9 @@ void kio_svnProtocol::initNotifier(bool is_checkout, bool is_export, bool suppre
|
|
|
|
ctx->notify_baton = nb;
|
|
|
|
ctx->notify_baton = nb;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
svn_error_t* kio_svnProtocol::checkAuth(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t /*may_save*/, apr_pool_t *pool) {
|
|
|
|
svn_error_t* tdeio_svnProtocol::checkAuth(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t /*may_save*/, apr_pool_t *pool) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::checkAuth() for " << realm << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::checkAuth() for " << realm << endl;
|
|
|
|
kio_svnProtocol *p = ( kio_svnProtocol* )baton;
|
|
|
|
kio_svnProtocol *p = ( tdeio_svnProtocol* )baton;
|
|
|
|
svn_auth_cred_simple_t *ret = (svn_auth_cred_simple_t*)apr_pcalloc (pool, sizeof (*ret));
|
|
|
|
svn_auth_cred_simple_t *ret = (svn_auth_cred_simple_t*)apr_pcalloc (pool, sizeof (*ret));
|
|
|
|
|
|
|
|
|
|
|
|
// p->info.keepPassword = true;
|
|
|
|
// p->info.keepPassword = true;
|
|
|
@ -222,14 +222,14 @@ svn_error_t* kio_svnProtocol::checkAuth(svn_auth_cred_simple_t **cred, void *bat
|
|
|
|
return SVN_NO_ERROR;
|
|
|
|
return SVN_NO_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::recordCurrentURL(const KURL& url) {
|
|
|
|
void tdeio_svnProtocol::recordCurrentURL(const KURL& url) {
|
|
|
|
myURL = url;
|
|
|
|
myURL = url;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//don't implement mimeType() until we don't need to download the whole file
|
|
|
|
//don't implement mimeType() until we don't need to download the whole file
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::get(const KURL& url ){
|
|
|
|
void tdeio_svnProtocol::get(const KURL& url ){
|
|
|
|
kdDebug(7128) << "kio_svn::get(const KURL& url)" << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::get(const KURL& url)" << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
TQString remoteServer = url.host();
|
|
|
|
TQString remoteServer = url.host();
|
|
|
|
infoMessage(i18n("Looking for %1...").arg( remoteServer ) );
|
|
|
|
infoMessage(i18n("Looking for %1...").arg( remoteServer ) );
|
|
|
@ -294,8 +294,8 @@ void kio_svnProtocol::get(const KURL& url ){
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::stat(const KURL & url){
|
|
|
|
void tdeio_svnProtocol::stat(const KURL & url){
|
|
|
|
kdDebug(7128) << "kio_svn::stat(const KURL& url) : " << url.url() << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::stat(const KURL& url) : " << url.url() << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
void *ra_baton, *session;
|
|
|
|
void *ra_baton, *session;
|
|
|
|
svn_ra_plugin_t *ra_lib;
|
|
|
|
svn_ra_plugin_t *ra_lib;
|
|
|
@ -401,8 +401,8 @@ void kio_svnProtocol::stat(const KURL & url){
|
|
|
|
svn_pool_destroy( subpool );
|
|
|
|
svn_pool_destroy( subpool );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::listDir(const KURL& url){
|
|
|
|
void tdeio_svnProtocol::listDir(const KURL& url){
|
|
|
|
kdDebug(7128) << "kio_svn::listDir(const KURL& url) : " << url.url() << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::listDir(const KURL& url) : " << url.url() << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_hash_t *dirents;
|
|
|
|
apr_hash_t *dirents;
|
|
|
@ -486,7 +486,7 @@ void kio_svnProtocol::listDir(const KURL& url){
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) {
|
|
|
|
bool tdeio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) {
|
|
|
|
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;
|
|
|
@ -513,8 +513,8 @@ bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString&
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions*/, bool /*overwrite*/) {
|
|
|
|
void tdeio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions*/, bool /*overwrite*/) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::copy() Source : " << src.url() << " Dest : " << dest.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::copy() Source : " << src.url() << " Dest : " << dest.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -559,8 +559,8 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
|
|
|
|
void tdeio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::mkdir(LIST) : " << list << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::mkdir(LIST) : " << list << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -572,7 +572,7 @@ void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
|
|
|
|
KURL::List::const_iterator it = list.begin(), end = list.end();
|
|
|
|
KURL::List::const_iterator it = list.begin(), end = list.end();
|
|
|
|
for ( ; it != end; ++it ) {
|
|
|
|
for ( ; it != end; ++it ) {
|
|
|
|
TQString cur = makeSvnURL( *it );
|
|
|
|
TQString cur = makeSvnURL( *it );
|
|
|
|
kdDebug( 7128 ) << "kio_svnProtocol::mkdir raw url for subversion : " << cur << endl;
|
|
|
|
kdDebug( 7128 ) << "tdeio_svnProtocol::mkdir raw url for subversion : " << cur << endl;
|
|
|
|
const char *_target = apr_pstrdup( subpool, svn_path_canonicalize( apr_pstrdup( subpool, cur.utf8() ), subpool ) );
|
|
|
|
const char *_target = apr_pstrdup( subpool, svn_path_canonicalize( apr_pstrdup( subpool, cur.utf8() ), subpool ) );
|
|
|
|
(*(( const char ** )apr_array_push(( apr_array_header_t* )targets)) ) = _target;
|
|
|
|
(*(( const char ** )apr_array_push(( apr_array_header_t* )targets)) ) = _target;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -587,8 +587,8 @@ void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) {
|
|
|
|
void tdeio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::mkdir() : " << url.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::mkdir() : " << url.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -610,8 +610,8 @@ void kio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) {
|
|
|
|
void tdeio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::del() : " << url.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::del() : " << url.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -633,8 +633,8 @@ void kio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite*/) {
|
|
|
|
void tdeio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite*/) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::rename() Source : " << src.url() << " Dest : " << dest.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::rename() Source : " << src.url() << " Dest : " << dest.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -679,14 +679,14 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
void tdeio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::special" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::special" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
TQDataStream stream(data, IO_ReadOnly);
|
|
|
|
TQDataStream stream(data, IO_ReadOnly);
|
|
|
|
int tmp;
|
|
|
|
int tmp;
|
|
|
|
|
|
|
|
|
|
|
|
stream >> tmp;
|
|
|
|
stream >> tmp;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::special " << tmp << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::special " << tmp << endl;
|
|
|
|
|
|
|
|
|
|
|
|
switch ( tmp ) {
|
|
|
|
switch ( tmp ) {
|
|
|
|
case SVN_CHECKOUT:
|
|
|
|
case SVN_CHECKOUT:
|
|
|
@ -698,7 +698,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> wc;
|
|
|
|
stream >> wc;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revkind;
|
|
|
|
stream >> revkind;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol CHECKOUT from " << repository.url() << " to " << wc.url() << " at " << revnumber << " or " << revkind << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol CHECKOUT from " << repository.url() << " to " << wc.url() << " at " << revnumber << " or " << revkind << endl;
|
|
|
|
checkout( repository, wc, revnumber, revkind );
|
|
|
|
checkout( repository, wc, revnumber, revkind );
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -710,7 +710,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> wc;
|
|
|
|
stream >> wc;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revkind;
|
|
|
|
stream >> revkind;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol UPDATE " << wc.url() << " at " << revnumber << " or " << revkind << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol UPDATE " << wc.url() << " at " << revnumber << " or " << revkind << endl;
|
|
|
|
update(wc, revnumber, revkind );
|
|
|
|
update(wc, revnumber, revkind );
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -722,13 +722,13 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> tmp;
|
|
|
|
stream >> tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
kdDebug(7128) << "kio_svnProtocol COMMIT" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol COMMIT" << endl;
|
|
|
|
commit( wclist );
|
|
|
|
commit( wclist );
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case SVN_LOG:
|
|
|
|
case SVN_LOG:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug(7128) << "kio_svnProtocol LOG" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol LOG" << endl;
|
|
|
|
int revstart, revend;
|
|
|
|
int revstart, revend;
|
|
|
|
TQString revkindstart, revkindend;
|
|
|
|
TQString revkindstart, revkindend;
|
|
|
|
KURL::List targets;
|
|
|
|
KURL::List targets;
|
|
|
@ -749,7 +749,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
KURL wc,repos;
|
|
|
|
KURL wc,repos;
|
|
|
|
stream >> repos;
|
|
|
|
stream >> repos;
|
|
|
|
stream >> wc;
|
|
|
|
stream >> wc;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol IMPORT" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol IMPORT" << endl;
|
|
|
|
import(repos,wc);
|
|
|
|
import(repos,wc);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -757,7 +757,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KURL wc;
|
|
|
|
KURL wc;
|
|
|
|
stream >> wc;
|
|
|
|
stream >> wc;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol ADD" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol ADD" << endl;
|
|
|
|
add(wc);
|
|
|
|
add(wc);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -769,7 +769,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> tmp;
|
|
|
|
stream >> tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
kdDebug(7128) << "kio_svnProtocol DEL" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol DEL" << endl;
|
|
|
|
wc_delete(wclist);
|
|
|
|
wc_delete(wclist);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -781,7 +781,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> tmp;
|
|
|
|
stream >> tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
wclist << tmp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
kdDebug(7128) << "kio_svnProtocol REVERT" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol REVERT" << endl;
|
|
|
|
wc_revert(wclist);
|
|
|
|
wc_revert(wclist);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -793,7 +793,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> wc;
|
|
|
|
stream >> wc;
|
|
|
|
stream >> checkRepos;
|
|
|
|
stream >> checkRepos;
|
|
|
|
stream >> fullRecurse;
|
|
|
|
stream >> fullRecurse;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol STATUS" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol STATUS" << endl;
|
|
|
|
wc_status(wc,checkRepos,fullRecurse);
|
|
|
|
wc_status(wc,checkRepos,fullRecurse);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -801,7 +801,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KURL::List list;
|
|
|
|
KURL::List list;
|
|
|
|
stream >> list;
|
|
|
|
stream >> list;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol MKDIR" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol MKDIR" << endl;
|
|
|
|
mkdir(list,0);
|
|
|
|
mkdir(list,0);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -811,7 +811,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
bool recurse;
|
|
|
|
bool recurse;
|
|
|
|
stream >> url;
|
|
|
|
stream >> url;
|
|
|
|
stream >> recurse;
|
|
|
|
stream >> recurse;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol RESOLVE" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol RESOLVE" << endl;
|
|
|
|
wc_resolve(url,recurse);
|
|
|
|
wc_resolve(url,recurse);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -826,7 +826,7 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> recurse;
|
|
|
|
stream >> recurse;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revnumber;
|
|
|
|
stream >> revkind;
|
|
|
|
stream >> revkind;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol SWITCH" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol SWITCH" << endl;
|
|
|
|
svn_switch(wc,url,revnumber,revkind,recurse);
|
|
|
|
svn_switch(wc,url,revnumber,revkind,recurse);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -843,19 +843,19 @@ void kio_svnProtocol::special( const TQByteArray& data ) {
|
|
|
|
stream >> rev2;
|
|
|
|
stream >> rev2;
|
|
|
|
stream >> revkind2;
|
|
|
|
stream >> revkind2;
|
|
|
|
stream >> recurse;
|
|
|
|
stream >> recurse;
|
|
|
|
kdDebug(7128) << "kio_svnProtocol DIFF" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol DIFF" << endl;
|
|
|
|
svn_diff(url1,url2,rev1,rev2,revkind1,revkind2,recurse);
|
|
|
|
svn_diff(url1,url2,rev1,rev2,revkind1,revkind2,recurse);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug(7128) << "kio_svnProtocol DEFAULT" << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol DEFAULT" << endl;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::popupMessage( const TQString& message ) {
|
|
|
|
void tdeio_svnProtocol::popupMessage( const TQString& message ) {
|
|
|
|
TQByteArray params;
|
|
|
|
TQByteArray params;
|
|
|
|
TQDataStream stream(params, IO_WriteOnly);
|
|
|
|
TQDataStream stream(params, IO_WriteOnly);
|
|
|
|
stream << message;
|
|
|
|
stream << message;
|
|
|
@ -864,8 +864,8 @@ void kio_svnProtocol::popupMessage( const TQString& message ) {
|
|
|
|
kdWarning() << "Communication with KDED:KSvnd failed" << endl;
|
|
|
|
kdWarning() << "Communication with KDED:KSvnd failed" << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets ) {
|
|
|
|
void tdeio_svnProtocol::svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets ) {
|
|
|
|
kdDebug(7128) << "kio_svn::log : " << targets << " from revision " << revstart << " or " << revkindstart << " to "
|
|
|
|
kdDebug(7128) << "tdeio_svn::log : " << targets << " from revision " << revstart << " or " << revkindstart << " to "
|
|
|
|
" revision " << revend << " or " << revkindend
|
|
|
|
" revision " << revend << " or " << revkindend
|
|
|
|
<< endl;
|
|
|
|
<< endl;
|
|
|
|
|
|
|
|
|
|
|
@ -880,7 +880,7 @@ void kio_svnProtocol::svn_log( int revstart, const TQString& revkindstart, int r
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const TQString& revkind, apr_pool_t *pool ) {
|
|
|
|
svn_opt_revision_t tdeio_svnProtocol::createRevision( int revision, const TQString& revkind, apr_pool_t *pool ) {
|
|
|
|
svn_opt_revision_t result,endrev;
|
|
|
|
svn_opt_revision_t result,endrev;
|
|
|
|
|
|
|
|
|
|
|
|
if ( revision != -1 ) {
|
|
|
|
if ( revision != -1 ) {
|
|
|
@ -896,8 +896,8 @@ svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const TQString
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const TQString& revkind1,const TQString& revkind2,bool recurse) {
|
|
|
|
void tdeio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const TQString& revkind1,const TQString& revkind2,bool recurse) {
|
|
|
|
kdDebug(7128) << "kio_svn::diff : " << url1.path() << " at revision " << rev1 << " or " << revkind1 << " with "
|
|
|
|
kdDebug(7128) << "tdeio_svn::diff : " << url1.path() << " at revision " << rev1 << " or " << revkind1 << " with "
|
|
|
|
<< url2.path() << " at revision " << rev2 << " or " << revkind2
|
|
|
|
<< url2.path() << " at revision " << rev2 << " or " << revkind2
|
|
|
|
<< endl ;
|
|
|
|
<< endl ;
|
|
|
|
|
|
|
|
|
|
|
@ -960,8 +960,8 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const TQString& revkind, bool recurse) {
|
|
|
|
void tdeio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const TQString& revkind, bool recurse) {
|
|
|
|
kdDebug(7128) << "kio_svn::switch : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::switch : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
|
|
|
|
|
|
|
@ -987,8 +987,8 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& revkind ) {
|
|
|
|
void tdeio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& revkind ) {
|
|
|
|
kdDebug(7128) << "kio_svn::update : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::update : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
KURL dest = wc;
|
|
|
|
KURL dest = wc;
|
|
|
@ -1007,8 +1007,8 @@ void kio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& rev
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
|
|
|
|
void tdeio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::import() : " << wc.url() << " into " << repos.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::import() : " << wc.url() << " into " << repos.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -1035,8 +1035,8 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind ) {
|
|
|
|
void tdeio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind ) {
|
|
|
|
kdDebug(7128) << "kio_svn::checkout : " << repos.url() << " into " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
kdDebug(7128) << "tdeio_svn::checkout : " << repos.url() << " into " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
KURL nurl = repos;
|
|
|
|
KURL nurl = repos;
|
|
|
@ -1059,8 +1059,8 @@ void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::commit(const KURL::List& wc) {
|
|
|
|
void tdeio_svnProtocol::commit(const KURL::List& wc) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::commit() : " << wc << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::commit() : " << wc << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -1104,8 +1104,8 @@ void kio_svnProtocol::commit(const KURL::List& wc) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::add(const KURL& wc) {
|
|
|
|
void tdeio_svnProtocol::add(const KURL& wc) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::add() : " << wc.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::add() : " << wc.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
bool nonrecursive = false;
|
|
|
|
bool nonrecursive = false;
|
|
|
@ -1124,8 +1124,8 @@ void kio_svnProtocol::add(const KURL& wc) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::wc_delete(const KURL::List& wc) {
|
|
|
|
void tdeio_svnProtocol::wc_delete(const KURL::List& wc) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::wc_delete() : " << wc << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::wc_delete() : " << wc << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
|
svn_client_commit_info_t *commit_info = NULL;
|
|
|
@ -1150,8 +1150,8 @@ void kio_svnProtocol::wc_delete(const KURL::List& wc) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::wc_revert(const KURL::List& wc) {
|
|
|
|
void tdeio_svnProtocol::wc_revert(const KURL::List& wc) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::revert() : " << wc << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::revert() : " << wc << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
bool nonrecursive = false;
|
|
|
|
bool nonrecursive = false;
|
|
|
@ -1174,8 +1174,8 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) {
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
svn_pool_destroy (subpool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const TQString& revkind) {
|
|
|
|
void tdeio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const TQString& revkind) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::status() : " << wc.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::status() : " << wc.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
svn_revnum_t result_rev;
|
|
|
|
svn_revnum_t result_rev;
|
|
|
@ -1189,7 +1189,7 @@ void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurs
|
|
|
|
|
|
|
|
|
|
|
|
initNotifier(false, false, false, subpool);
|
|
|
|
initNotifier(false, false, false, 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);
|
|
|
|
svn_error_t *err = svn_client_status(&result_rev, svn_path_canonicalize( nurl.path().utf8(), subpool ), &rev, tdeio_svnProtocol::status, this, fullRecurse, getAll, checkRepos, no_ignore, ctx, subpool);
|
|
|
|
|
|
|
|
|
|
|
|
if ( err )
|
|
|
|
if ( err )
|
|
|
|
error( TDEIO::ERR_SLAVE_DEFINED, err->message );
|
|
|
|
error( TDEIO::ERR_SLAVE_DEFINED, err->message );
|
|
|
@ -1200,7 +1200,7 @@ void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurs
|
|
|
|
|
|
|
|
|
|
|
|
//change the proto and remove trailing /
|
|
|
|
//change the proto and remove trailing /
|
|
|
|
//remove double / also
|
|
|
|
//remove double / also
|
|
|
|
TQString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
|
|
|
|
TQString tdeio_svnProtocol::makeSvnURL ( const KURL& url ) const {
|
|
|
|
TQString kproto = url.protocol();
|
|
|
|
TQString kproto = url.protocol();
|
|
|
|
KURL tpURL = url;
|
|
|
|
KURL tpURL = url;
|
|
|
|
tpURL.cleanPath( true );
|
|
|
|
tpURL.cleanPath( true );
|
|
|
@ -1241,7 +1241,7 @@ TQString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
|
|
|
|
return tpURL.url(-1);
|
|
|
|
return tpURL.url(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString kio_svnProtocol::chooseProtocol ( const TQString& kproto ) const {
|
|
|
|
TQString tdeio_svnProtocol::chooseProtocol ( const TQString& kproto ) const {
|
|
|
|
if ( kproto == "svn+http" ) return TQString( "http" );
|
|
|
|
if ( kproto == "svn+http" ) return TQString( "http" );
|
|
|
|
else if ( kproto == "svn+https" ) return TQString( "https" );
|
|
|
|
else if ( kproto == "svn+https" ) return TQString( "https" );
|
|
|
|
else if ( kproto == "svn+ssh" ) return TQString( "svn+ssh" );
|
|
|
|
else if ( kproto == "svn+ssh" ) return TQString( "svn+ssh" );
|
|
|
@ -1275,7 +1275,7 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char
|
|
|
|
TQByteArray reply;
|
|
|
|
TQByteArray reply;
|
|
|
|
TQString result;
|
|
|
|
TQString result;
|
|
|
|
TQStringList slist;
|
|
|
|
TQStringList slist;
|
|
|
|
kio_svnProtocol *p = ( kio_svnProtocol* )baton;
|
|
|
|
kio_svnProtocol *p = ( tdeio_svnProtocol* )baton;
|
|
|
|
svn_stringbuf_t *message = NULL;
|
|
|
|
svn_stringbuf_t *message = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < commit_items->nelts; i++) {
|
|
|
|
for (int i = 0; i < commit_items->nelts; i++) {
|
|
|
@ -1339,7 +1339,7 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char
|
|
|
|
return SVN_NO_ERROR;
|
|
|
|
return SVN_NO_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision) {
|
|
|
|
void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision) {
|
|
|
|
kdDebug(7128) << "NOTIFY : " << path << " updated at revision " << revision << " action : " << action << ", kind : " << kind << " , content_state : " << content_state << ", prop_state : " << prop_state << endl;
|
|
|
|
kdDebug(7128) << "NOTIFY : " << path << " updated at revision " << revision << " action : " << action << ", kind : " << kind << " , content_state : " << content_state << ", prop_state : " << prop_state << endl;
|
|
|
|
|
|
|
|
|
|
|
|
TQString userstring;
|
|
|
|
TQString userstring;
|
|
|
@ -1516,7 +1516,7 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//// End convert
|
|
|
|
//// End convert
|
|
|
|
|
|
|
|
|
|
|
|
kio_svnProtocol *p = ( kio_svnProtocol* )nb->master;
|
|
|
|
kio_svnProtocol *p = ( tdeio_svnProtocol* )nb->master;
|
|
|
|
|
|
|
|
|
|
|
|
p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , TQString::fromUtf8( path ));
|
|
|
|
p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , TQString::fromUtf8( path ));
|
|
|
|
p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "action", TQString::number( action ));
|
|
|
|
p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "action", TQString::number( action ));
|
|
|
@ -1529,7 +1529,7 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action
|
|
|
|
p->incCounter();
|
|
|
|
p->incCounter();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *status) {
|
|
|
|
void tdeio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *status) {
|
|
|
|
kdDebug(7128) << "STATUS : " << path << ", wc text status : " << status->text_status
|
|
|
|
kdDebug(7128) << "STATUS : " << path << ", wc text status : " << status->text_status
|
|
|
|
<< ", wc prop status : " << status->prop_status
|
|
|
|
<< ", wc prop status : " << status->prop_status
|
|
|
|
<< ", repos text status : " << status->repos_text_status
|
|
|
|
<< ", repos text status : " << status->repos_text_status
|
|
|
@ -1537,7 +1537,7 @@ void kio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *sta
|
|
|
|
<< endl;
|
|
|
|
<< endl;
|
|
|
|
|
|
|
|
|
|
|
|
TQByteArray params;
|
|
|
|
TQByteArray params;
|
|
|
|
kio_svnProtocol *p = ( kio_svnProtocol* )baton;
|
|
|
|
kio_svnProtocol *p = ( tdeio_svnProtocol* )baton;
|
|
|
|
|
|
|
|
|
|
|
|
TQDataStream stream(params, IO_WriteOnly);
|
|
|
|
TQDataStream stream(params, IO_WriteOnly);
|
|
|
|
long int rev = status->entry ? status->entry->revision : 0;
|
|
|
|
long int rev = status->entry ? status->entry->revision : 0;
|
|
|
@ -1553,8 +1553,8 @@ void kio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *sta
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void kio_svnProtocol::wc_resolve( const KURL& wc, bool recurse ) {
|
|
|
|
void tdeio_svnProtocol::wc_resolve( const KURL& wc, bool recurse ) {
|
|
|
|
kdDebug(7128) << "kio_svnProtocol::wc_resolve() : " << wc.url() << endl;
|
|
|
|
kdDebug(7128) << "tdeio_svnProtocol::wc_resolve() : " << wc.url() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
apr_pool_t *subpool = svn_pool_create (pool);
|
|
|
|
|
|
|
|
|
|
|
@ -1574,19 +1574,19 @@ void kio_svnProtocol::wc_resolve( const KURL& wc, bool recurse ) {
|
|
|
|
extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KDE_EXPORT int kdemain(int argc, char **argv) {
|
|
|
|
KDE_EXPORT int kdemain(int argc, char **argv) {
|
|
|
|
TDEInstance instance( "kio_svn" );
|
|
|
|
TDEInstance instance( "tdeio_svn" );
|
|
|
|
|
|
|
|
|
|
|
|
kdDebug(7128) << "*** Starting kio_svn " << endl;
|
|
|
|
kdDebug(7128) << "*** Starting tdeio_svn " << endl;
|
|
|
|
|
|
|
|
|
|
|
|
if (argc != 4) {
|
|
|
|
if (argc != 4) {
|
|
|
|
kdDebug(7128) << "Usage: kio_svn protocol domain-socket1 domain-socket2" << endl;
|
|
|
|
kdDebug(7128) << "Usage: tdeio_svn protocol domain-socket1 domain-socket2" << endl;
|
|
|
|
exit(-1);
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kio_svnProtocol slave(argv[2], argv[3]);
|
|
|
|
kio_svnProtocol slave(argv[2], argv[3]);
|
|
|
|
slave.dispatchLoop();
|
|
|
|
slave.dispatchLoop();
|
|
|
|
|
|
|
|
|
|
|
|
kdDebug(7128) << "*** kio_svn Done" << endl;
|
|
|
|
kdDebug(7128) << "*** tdeio_svn Done" << endl;
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|