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