diff options
Diffstat (limited to 'src/kiosvn/kiosvn.cpp')
-rw-r--r-- | src/kiosvn/kiosvn.cpp | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/src/kiosvn/kiosvn.cpp b/src/kiosvn/kiosvn.cpp index dfae81b..2d8365c 100644 --- a/src/kiosvn/kiosvn.cpp +++ b/src/kiosvn/kiosvn.cpp @@ -68,7 +68,7 @@ namespace TDEIO class KioSvnData { public: - KioSvnData(kio_svnProtocol*); + KioSvnData(tdeio_svnProtocol*); virtual ~KioSvnData(); void reInitClient(); @@ -83,7 +83,7 @@ public: }; -KioSvnData::KioSvnData(kio_svnProtocol*par) +KioSvnData::KioSvnData(tdeio_svnProtocol*par) : m_Listener(par),first_done(false) { m_Svnclient=svn::Client::getobject(0,0); @@ -138,14 +138,14 @@ svn::Revision KioSvnData::urlToRev(const KURL&url) } -kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket) - : SlaveBase("kio_ksvn", pool_socket, app_socket),StreamWrittenCb() +tdeio_svnProtocol::tdeio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket) + : SlaveBase("tdeio_ksvn", pool_socket, app_socket),StreamWrittenCb() { m_pData=new KioSvnData(this); TDEGlobal::locale()->insertCatalogue("tdesvn"); } -kio_svnProtocol::~kio_svnProtocol() +tdeio_svnProtocol::~tdeio_svnProtocol() { kdDebug()<<"Delete kio protocol"<<endl; delete m_pData; @@ -161,33 +161,33 @@ extern "C" int kdemain(int argc, char **argv) { kdDebug()<<"kdemain" << endl; - TDEInstance instance( "kio_ksvn" ); + TDEInstance instance( "tdeio_ksvn" ); // start the tdesvnd DCOP service TQString error; TQCString appId; - kdDebug(7101) << "*** Starting kio_ksvn " << endl; + kdDebug(7101) << "*** Starting tdeio_ksvn " << endl; if (argc != 4) { - kdDebug(7101) << "Usage: kio_ksvn protocol domain-socket1 domain-socket2" << endl; + kdDebug(7101) << "Usage: tdeio_ksvn protocol domain-socket1 domain-socket2" << endl; exit(-1); } - TDEIO::kio_svnProtocol slave(argv[2], argv[3]); + TDEIO::tdeio_svnProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); - kdDebug(7101) << "*** kio_ksvn Done" << endl; + kdDebug(7101) << "*** tdeio_ksvn Done" << endl; return 0; } namespace TDEIO { /*! - \fn kio_svnProtocol::listDir (const KURL&url) + \fn tdeio_svnProtocol::listDir (const KURL&url) */ -void kio_svnProtocol::listDir(const KURL&url) +void tdeio_svnProtocol::listDir(const KURL&url) { - kdDebug() << "kio_svn::listDir(const KURL& url) : " << url.url() << endl ; + kdDebug() << "tdeio_svn::listDir(const KURL& url) : " << url.url() << endl ; svn::DirEntries dlist; svn::Revision rev = m_pData->urlToRev(url); if (rev == svn::Revision::UNDEFINED) { @@ -223,9 +223,9 @@ void kio_svnProtocol::listDir(const KURL&url) finished(); } -void kio_svnProtocol::stat(const KURL& url) +void tdeio_svnProtocol::stat(const KURL& url) { - kdDebug()<<"kio_svn::stat "<< url << endl; + kdDebug()<<"tdeio_svn::stat "<< url << endl; svn::Revision rev = m_pData->urlToRev(url); if (rev == svn::Revision::UNDEFINED) { rev = svn::Revision::HEAD; @@ -264,9 +264,9 @@ void kio_svnProtocol::stat(const KURL& url) finished(); } -void kio_svnProtocol::get(const KURL& url) +void tdeio_svnProtocol::get(const KURL& url) { - kdDebug()<<"kio_svn::get "<< url << endl; + kdDebug()<<"tdeio_svn::get "<< url << endl; if (m_pData->m_Listener.contextCancel()) { finished(); return; @@ -290,9 +290,9 @@ void kio_svnProtocol::get(const KURL& url) finished(); } -void kio_svnProtocol::mkdir(const KURL &url, int) +void tdeio_svnProtocol::mkdir(const KURL &url, int) { - kdDebug()<<"kio_svn::mkdir "<< url << endl; + kdDebug()<<"tdeio_svn::mkdir "<< url << endl; svn::Revision rev = m_pData->urlToRev(url); if (rev == svn::Revision::UNDEFINED) { rev = svn::Revision::HEAD; @@ -303,11 +303,11 @@ void kio_svnProtocol::mkdir(const KURL &url, int) }catch (const svn::ClientException&e) { error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } - kdDebug()<<"kio_svn::mkdir finished " << url << endl; + kdDebug()<<"tdeio_svn::mkdir finished " << url << endl; finished(); } -void kio_svnProtocol::mkdir(const KURL::List &urls, int) +void tdeio_svnProtocol::mkdir(const KURL::List &urls, int) { svn::Pathes p; for ( TQValueListConstIterator<KURL> it = urls.begin(); it != urls.end() ; ++it ) { @@ -322,9 +322,9 @@ void kio_svnProtocol::mkdir(const KURL::List &urls, int) finished(); } -void kio_svnProtocol::rename(const KURL&src,const KURL&target,bool force) +void tdeio_svnProtocol::rename(const KURL&src,const KURL&target,bool force) { - kdDebug()<<"kio_svn::rename "<< src << " to " << target << endl; + kdDebug()<<"tdeio_svn::rename "<< src << " to " << target << endl; TQString msg; m_pData->m_CurrentContext->setLogMessage(getDefaultLog()); try { @@ -332,15 +332,15 @@ void kio_svnProtocol::rename(const KURL&src,const KURL&target,bool force) }catch (const svn::ClientException&e) { error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } - kdDebug()<<"kio_svn::rename finished" << endl; + kdDebug()<<"tdeio_svn::rename finished" << endl; finished(); } -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) { Q_UNUSED(permissions); Q_UNUSED(overwrite); - kdDebug()<<"kio_svn::copy "<< src << " to " << dest << endl; + kdDebug()<<"tdeio_svn::copy "<< src << " to " << dest << endl; svn::Revision rev = m_pData->urlToRev(src); if (rev == svn::Revision::UNDEFINED) { rev = svn::Revision::HEAD; @@ -353,14 +353,14 @@ void kio_svnProtocol::copy(const KURL&src,const KURL&dest,int permissions,bool o error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } m_pData->dispProgress=false; - kdDebug()<<"kio_svn::copy finished" << endl; + kdDebug()<<"tdeio_svn::copy finished" << endl; finished(); } -void kio_svnProtocol::del(const KURL&src,bool isfile) +void tdeio_svnProtocol::del(const KURL&src,bool isfile) { Q_UNUSED(isfile); - kdDebug()<<"kio_svn::del "<< src << endl; + kdDebug()<<"tdeio_svn::del "<< src << endl; //m_pData->reInitClient(); svn::Revision rev = m_pData->urlToRev(src); if (rev == svn::Revision::UNDEFINED) { @@ -375,17 +375,17 @@ void kio_svnProtocol::del(const KURL&src,bool isfile) kdDebug()<<ex<<endl; error( TDEIO::ERR_SLAVE_DEFINED,ex); } - kdDebug()<<"kio_svn::del finished" << endl; + kdDebug()<<"tdeio_svn::del finished" << endl; finished(); } -bool kio_svnProtocol::getLogMsg(TQString&t) +bool tdeio_svnProtocol::getLogMsg(TQString&t) { svn::CommitItemList _items; return m_pData->m_Listener.contextGetLogMessage(t,_items); } -bool kio_svnProtocol::checkWc(const KURL&url) +bool tdeio_svnProtocol::checkWc(const KURL&url) { if (url.isEmpty()||!url.isLocalFile()) return false; svn::Revision peg(svn_opt_revision_unspecified); @@ -403,7 +403,7 @@ bool kio_svnProtocol::checkWc(const KURL&url) return false; } -TQString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) +TQString tdeio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) { TQString res; TQString proto = svn::Url::transformProtokoll(url.protocol()); @@ -430,7 +430,7 @@ TQString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) return res; } -bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, TDEIO::UDSEntry& entry) +bool tdeio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, TDEIO::UDSEntry& entry) { #if 0 kdDebug() << "MTime : " << ( long )mtime << endl; @@ -467,13 +467,13 @@ bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& return true; } -void kio_svnProtocol::special(const TQByteArray& data) +void tdeio_svnProtocol::special(const TQByteArray& data) { - kdDebug()<<"kio_svnProtocol::special"<<endl; + kdDebug()<<"tdeio_svnProtocol::special"<<endl; TQDataStream stream(data,IO_ReadOnly); int tmp; stream >> tmp; - kdDebug() << "kio_svnProtocol::special " << tmp << endl; + kdDebug() << "tdeio_svnProtocol::special " << tmp << endl; switch (tmp) { case SVN_CHECKOUT: { @@ -484,7 +484,7 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> wc; stream >> revnumber; stream >> revkind; - kdDebug(0) << "kio_svnProtocol CHECKOUT from " << repository.url() << " to " << wc.url() << " at " << revnumber << " or " << revkind << endl; + kdDebug(0) << "tdeio_svnProtocol CHECKOUT from " << repository.url() << " to " << wc.url() << " at " << revnumber << " or " << revkind << endl; checkout( repository, wc, revnumber, revkind ); break; } @@ -496,7 +496,7 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> wc; stream >> revnumber; stream >> revkind; - kdDebug(0) << "kio_svnProtocol UPDATE " << wc.url() << " at " << revnumber << " or " << revkind << endl; + kdDebug(0) << "tdeio_svnProtocol UPDATE " << wc.url() << " at " << revnumber << " or " << revkind << endl; update(wc, revnumber, revkind ); break; } @@ -508,13 +508,13 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> tmp; wclist << tmp; } - kdDebug(0) << "kio_svnProtocol COMMIT" << endl; + kdDebug(0) << "tdeio_svnProtocol COMMIT" << endl; commit( wclist ); break; } case SVN_LOG: { - kdDebug(0) << "kio_svnProtocol LOG" << endl; + kdDebug(0) << "tdeio_svnProtocol LOG" << endl; int revstart, revend; TQString revkindstart, revkindend; KURL::List targets; @@ -535,14 +535,14 @@ void kio_svnProtocol::special(const TQByteArray& data) KURL wc,repos; stream >> repos; stream >> wc; - kdDebug(0) << "kio_ksvnProtocol IMPORT" << endl; + kdDebug(0) << "tdeio_ksvnProtocol IMPORT" << endl; import(repos,wc); break; } case SVN_ADD: { KURL wc; - kdDebug(0) << "kio_ksvnProtocol ADD" << endl; + kdDebug(0) << "tdeio_ksvnProtocol ADD" << endl; stream >> wc; add(wc); break; @@ -566,7 +566,7 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> tmp; wclist << tmp; } - kdDebug(7128) << "kio_svnProtocol REVERT" << endl; + kdDebug(7128) << "tdeio_svnProtocol REVERT" << endl; revert(wclist); break; } @@ -578,7 +578,7 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> wc; stream >> checkRepos; stream >> fullRecurse; - kdDebug(0) << "kio_svnProtocol STATUS" << endl; + kdDebug(0) << "tdeio_svnProtocol STATUS" << endl; status(wc,checkRepos,fullRecurse); break; } @@ -586,7 +586,7 @@ void kio_svnProtocol::special(const TQByteArray& data) { KURL::List list; stream >> list; - kdDebug(0) << "kio_svnProtocol MKDIR" << endl; + kdDebug(0) << "tdeio_svnProtocol MKDIR" << endl; mkdir(list,0); break; } @@ -596,7 +596,7 @@ void kio_svnProtocol::special(const TQByteArray& data) bool recurse; stream >> url; stream >> recurse; - kdDebug(7128) << "kio_svnProtocol RESOLVE" << endl; + kdDebug(7128) << "tdeio_svnProtocol RESOLVE" << endl; wc_resolve(url,recurse); break; } @@ -611,7 +611,7 @@ void kio_svnProtocol::special(const TQByteArray& data) stream >> recurse; stream >> revnumber; stream >> revkind; - kdDebug(7128) << "kio_svnProtocol SWITCH" << endl; + kdDebug(7128) << "tdeio_svnProtocol SWITCH" << endl; wc_switch(wc,url,recurse,revnumber,revkind); break; } @@ -637,7 +637,7 @@ void kio_svnProtocol::special(const TQByteArray& data) finished(); } -void kio_svnProtocol::update(const KURL&url,int revnumber,const TQString&revkind) +void tdeio_svnProtocol::update(const KURL&url,int revnumber,const TQString&revkind) { svn::Revision where(revnumber,revkind); /* update is always local - so make a path instead URI */ @@ -653,7 +653,7 @@ void kio_svnProtocol::update(const KURL&url,int revnumber,const TQString&revkind } } -void kio_svnProtocol::status(const KURL&wc,bool cR,bool rec) +void tdeio_svnProtocol::status(const KURL&wc,bool cR,bool rec) { svn::Revision where = svn::Revision::UNDEFINED; svn::StatusEntries dlist; @@ -684,7 +684,7 @@ void kio_svnProtocol::status(const KURL&wc,bool cR,bool rec) } } -void kio_svnProtocol::commit(const KURL::List&url) +void tdeio_svnProtocol::commit(const KURL::List&url) { /// @todo replace with direct call to tdesvn? TQByteArray reply; @@ -740,7 +740,7 @@ void kio_svnProtocol::commit(const KURL::List&url) } } -void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, const TQString&revstring) +void tdeio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, const TQString&revstring) { svn::Revision where(rev,revstring); svn::Revision peg = svn::Revision::UNDEFINED; @@ -753,7 +753,7 @@ void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, c } } -void kio_svnProtocol::svnlog(int revstart,const TQString&revstringstart,int revend, const TQString&revstringend, const KURL::List&urls) +void tdeio_svnProtocol::svnlog(int revstart,const TQString&revstringstart,int revend, const TQString&revstringend, const KURL::List&urls) { svn::Revision start(revstart,revstringstart); svn::Revision end(revend,revstringend); @@ -801,7 +801,7 @@ void kio_svnProtocol::svnlog(int revstart,const TQString&revstringstart,int reve } } -void kio_svnProtocol::revert(const KURL::List&l) +void tdeio_svnProtocol::revert(const KURL::List&l) { TQValueList<svn::Path> list; for (unsigned j=0; j<l.count();++j) { @@ -815,7 +815,7 @@ void kio_svnProtocol::revert(const KURL::List&l) } } -void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev,const TQString&revstring) +void tdeio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev,const TQString&revstring) { svn::Revision where(rev,revstring); svn::Path wc_path(wc.path()); @@ -826,7 +826,7 @@ void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev } } -void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQString&rstring1,int rnum2, const TQString&rstring2,bool rec) +void tdeio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQString&rstring1,int rnum2, const TQString&rstring2,bool rec) { TQByteArray ex; /// @todo read settings for diff (ignore contentype) @@ -836,7 +836,7 @@ void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQStr TQString u1 = makeSvnUrl(uri1,true); TQString u2 = makeSvnUrl(uri2,true); KTempDir tdir; - kdDebug() << "kio_ksvn::diff : " << u1 << " at revision " << r1.toString() << " with " + kdDebug() << "tdeio_ksvn::diff : " << u1 << " at revision " << r1.toString() << " with " << u2 << " at revision " << r2.toString() << endl ; @@ -855,7 +855,7 @@ void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQStr } } -void kio_svnProtocol::import(const KURL& repos, const KURL& wc) +void tdeio_svnProtocol::import(const KURL& repos, const KURL& wc) { try { TQString target = makeSvnUrl(repos); @@ -868,7 +868,7 @@ void kio_svnProtocol::import(const KURL& repos, const KURL& wc) finished(); } -void kio_svnProtocol::add(const KURL& wc) +void tdeio_svnProtocol::add(const KURL& wc) { TQString path = wc.path(); try { @@ -881,7 +881,7 @@ void kio_svnProtocol::add(const KURL& wc) finished(); } -void kio_svnProtocol::wc_delete(const KURL::List&l) +void tdeio_svnProtocol::wc_delete(const KURL::List&l) { svn::Pathes p; for ( TQValueListConstIterator<KURL> it = l.begin(); it != l.end() ; ++it ) { @@ -896,7 +896,7 @@ void kio_svnProtocol::wc_delete(const KURL::List&l) finished(); } -void kio_svnProtocol::wc_resolve(const KURL&url,bool recurse) +void tdeio_svnProtocol::wc_resolve(const KURL&url,bool recurse) { try { svn::Depth depth=recurse?svn::DepthInfinity:svn::DepthEmpty; @@ -908,45 +908,45 @@ void kio_svnProtocol::wc_resolve(const KURL&url,bool recurse) finished(); } -void kio_svnProtocol::streamWritten(const TDEIO::filesize_t current) +void tdeio_svnProtocol::streamWritten(const TDEIO::filesize_t current) { processedSize(current); } -void kio_svnProtocol::streamSendMime(KMimeMagicResult* mt) +void tdeio_svnProtocol::streamSendMime(KMimeMagicResult* mt) { if (mt) { mimeType(mt->mimeType()); } } -void kio_svnProtocol::streamPushData(TQByteArray array) +void tdeio_svnProtocol::streamPushData(TQByteArray array) { data(array); } -void kio_svnProtocol::contextProgress(long long int current, long long int) +void tdeio_svnProtocol::contextProgress(long long int current, long long int) { if (m_pData->dispProgress) { processedSize(current); } } -void kio_svnProtocol::streamTotalSizeNull() +void tdeio_svnProtocol::streamTotalSizeNull() { totalSize(0); } /*! - \fn kio_svnProtocol::getDefaultLog() + \fn tdeio_svnProtocol::getDefaultLog() */ -TQString kio_svnProtocol::getDefaultLog() +TQString tdeio_svnProtocol::getDefaultLog() { TQString res = TQString(); Kdesvnsettings::self()->readConfig(); - if (Kdesvnsettings::kio_use_standard_logmsg()) { - res = Kdesvnsettings::kio_standard_logmsg(); + if (Kdesvnsettings::tdeio_use_standard_logmsg()) { + res = Kdesvnsettings::tdeio_standard_logmsg(); } return res; } |