@ -51,7 +51,7 @@
# include <kinstance.h>
# include <kaboutdata.h>
using namespace K IO;
using namespace TDE IO;
using namespace SvnGlobal ;
subversionCore : : subversionCore ( subversionPart * part )
@ -125,9 +125,9 @@ void subversionCore::resolve( const KURL::List& list ) {
int cmd = 11 ;
bool recurse = true ;
s < < cmd < < * it < < recurse ;
SimpleJob * job = K IO: : special ( servURL , parms , true ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , true ) ;
job - > setWindow ( m_part - > mainWindow ( ) - > main ( ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
}
}
@ -141,9 +141,9 @@ void subversionCore::update( const KURL::List& list ) {
int rev = - 1 ;
s < < cmd < < list < < rev < < TQString ( " HEAD " ) ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , i18n ( " Subversion Update " ) , i18n ( " Subversion Update " ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , i18n ( " Subversion Update " ) , i18n ( " Subversion Update " ) ) ;
}
void subversionCore : : diff ( const KURL : : List & list , const TQString & where ) {
@ -159,9 +159,9 @@ void subversionCore::diff( const KURL::List& list, const TQString& where){
TQString revkind1 = where ;
TQString revkind2 = " WORKING " ;
s < < cmd < < * it < < * it < < rev1 < < revkind1 < < rev2 < < revkind2 < < true ;
KIO: : SimpleJob * job = K IO: : special ( servURL , parms , true ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
K IO: : NetAccess : : synchronousRun ( job , 0 ) ;
TDEIO: : SimpleJob * job = TDE IO: : special ( servURL , parms , true ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
TDE IO: : NetAccess : : synchronousRun ( job , 0 ) ;
if ( diffresult . count ( ) > 0 ) {
//check kompare is available
if ( ! KStandardDirs : : findExe ( " kompare " ) . isNull ( ) ) {
@ -240,9 +240,9 @@ void subversionCore::diffAsync( const KURL &pathOrUrl1, const KURL &pathOrUrl2,
kdDebug ( 9036 ) < < " diffing async : " < < pathOrUrl1 < < " and " < < pathOrUrl2 < < endl ;
s < < cmd < < pathOrUrl1 < < pathOrUrl2 < < rev1 < < revKind1 < < rev2 < < revKind2 < < recurse ;
s < < pegdiff ;
KIO: : SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotDiffResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , pathOrUrl1 . prettyURL ( ) , pathOrUrl2 . prettyURL ( ) ) ;
TDEIO: : SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotDiffResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , pathOrUrl1 . prettyURL ( ) , pathOrUrl2 . prettyURL ( ) ) ;
}
void subversionCore : : commit ( const KURL : : List & list , bool recurse , bool keeplocks ) {
@ -260,12 +260,12 @@ void subversionCore::commit( const KURL::List& list, bool recurse, bool keeplock
kdDebug ( 9036 ) < < " adding to list: " < < ( * it ) . prettyURL ( ) < < endl ;
s < < * it ;
}
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
if ( list . count ( ) = = 1 )
initProcessDlg ( ( K IO: : Job * ) job , ( * ( list . begin ( ) ) ) . prettyURL ( ) , i18n ( " Commit to remote repository " ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , ( * ( list . begin ( ) ) ) . prettyURL ( ) , i18n ( " Commit to remote repository " ) ) ;
else if ( list . count ( ) > 1 )
initProcessDlg ( ( K IO: : Job * ) job , i18n ( " From working copy " ) , i18n ( " Commit to remote repository " ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , i18n ( " From working copy " ) , i18n ( " Commit to remote repository " ) ) ;
}
// Right now, only one item for each action.
void subversionCore : : svnLog ( const KURL : : List & list ,
@ -294,10 +294,10 @@ void subversionCore::svnLog( const KURL::List& list,
kdDebug ( 9036 ) < < " svnCore: adding to list: " < < ( * it ) . prettyURL ( ) < < endl ;
s < < * it ;
}
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotLogResult ( K IO: : Job * ) ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotLogResult ( TDE IO: : Job * ) ) ) ;
// progress info. LogView is allowed and meaninful only for one url in KDev3.4
initProcessDlg ( ( K IO: : Job * ) job , ( * ( list . begin ( ) ) ) . prettyURL ( ) , i18n ( " Subversion Log View " ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , ( * ( list . begin ( ) ) ) . prettyURL ( ) , i18n ( " Subversion Log View " ) ) ;
}
void subversionCore : : blame ( const KURL & url , UrlMode mode , int revstart , TQString revKindStart , int revend , TQString revKindEnd )
@ -315,9 +315,9 @@ void subversionCore::blame( const KURL &url, UrlMode mode, int revstart, TQStrin
s < < cmd < < url < < ( int ) mode ;
s < < revstart < < revKindStart < < revend < < revKindEnd ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotBlameResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , url . prettyURL ( ) , i18n ( " Subversion Blame " ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotBlameResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , url . prettyURL ( ) , i18n ( " Subversion Blame " ) ) ;
}
void subversionCore : : add ( const KURL : : List & list ) {
@ -330,9 +330,9 @@ void subversionCore::add( const KURL::List& list ) {
int cmd = 6 ;
s < < cmd < < list ;
// add/delete/revert works on local copy. Don't need to show progress dialog
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
job - > setWindow ( m_part - > mainWindow ( ) - > main ( ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
}
void subversionCore : : del ( const KURL : : List & list ) {
@ -344,9 +344,9 @@ void subversionCore::del( const KURL::List& list ) {
int cmd = 7 ;
s < < cmd < < list ;
// add/delete/revert works on local copy. Don't need to show progress dialog
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
job - > setWindow ( m_part - > mainWindow ( ) - > main ( ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
}
void subversionCore : : revert ( const KURL : : List & list ) {
@ -357,9 +357,9 @@ void subversionCore::revert( const KURL::List& list ) {
TQDataStream s ( parms , IO_WriteOnly ) ;
int cmd = 8 ;
s < < cmd < < list ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
job - > setWindow ( m_part - > mainWindow ( ) - > main ( ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
}
void subversionCore : : checkout ( ) {
@ -375,9 +375,9 @@ void subversionCore::checkout() {
int rev = - 1 ;
s < < cmd < < servURL < < KURL ( wcPath ) < < rev < < TQString ( " HEAD " ) ;
servURL . setProtocol ( " kdevsvn+ " + servURL . protocol ( ) ) ; //make sure it starts with "svn"
SimpleJob * job = K IO: : special ( servURL , parms , true ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , true ) ;
job - > setWindow ( m_part - > mainWindow ( ) - > main ( ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotEndCheckout ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotEndCheckout ( TDE IO: : Job * ) ) ) ;
}
}
@ -392,9 +392,9 @@ void subversionCore::switchTree( const KURL &path, const KURL &repositUrl,
s < < cmd < < path < < repositUrl ;
s < < recurse < < revNum < < revKind ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , repositUrl . prettyURL ( ) , path . prettyURL ( ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , repositUrl . prettyURL ( ) , path . prettyURL ( ) ) ;
}
void subversionCore : : switchRelocate ( const KURL & path ,
@ -407,8 +407,8 @@ void subversionCore::switchRelocate( const KURL &path,
int cmd = 16 ;
s < < cmd < < path < < currentUrl < < newUrl < < recurse ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
// this doesn't contact repository
}
@ -422,9 +422,9 @@ void subversionCore::svnCopy( const KURL &src, int srcRev, const TQString &srcRe
int cmd = 17 ;
s < < cmd < < src < < srcRev < < srcRevKind < < dest ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , src . prettyURL ( ) , dest . prettyURL ( ) ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , src . prettyURL ( ) , dest . prettyURL ( ) ) ;
}
void subversionCore : : merge ( const KURL & src1 , int rev1 , TQString revKind1 ,
@ -439,9 +439,9 @@ void subversionCore::merge( const KURL &src1, int rev1, TQString revKind1,
s < < cmd < < src1 < < rev1 < < revKind1 < < src2 < < rev2 < < revKind2 < < wc_path ;
s < < recurse < < ignore_ancestry < < force < < dry_run ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
initProcessDlg ( ( K IO: : Job * ) job , src1 . prettyURL ( ) + " \n " + src2 . prettyURL ( ) ,
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) , this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
initProcessDlg ( ( TDE IO: : Job * ) job , src1 . prettyURL ( ) + " \n " + src2 . prettyURL ( ) ,
wc_path . prettyURL ( ) ) ;
}
@ -452,10 +452,10 @@ bool subversionCore::clientInfo( KURL path_or_url, bool recurse, TQMap< KURL, Sv
TQDataStream s ( parms , IO_WriteOnly ) ;
int cmd = 15 ;
s < < cmd < < path_or_url < < - 1 < < TQString ( " UNSPECIFIED " ) < < - 1 < < TQString ( " UNSPECIFIED " ) < < recurse ;
SimpleJob * job = K IO: : special ( servURL , parms , false ) ;
SimpleJob * job = TDE IO: : special ( servURL , parms , false ) ;
TQMap < TQString , TQString > ma ;
K IO: : NetAccess : : synchronousRun ( job , 0 , 0 , 0 , & ma ) ; // synchronize
TDE IO: : NetAccess : : synchronousRun ( job , 0 , 0 , 0 , & ma ) ; // synchronize
TQValueList < TQString > keys = ma . keys ( ) ;
TQValueList < TQString > : : Iterator begin = keys . begin ( ) , end = keys . end ( ) , it ;
@ -493,7 +493,7 @@ bool subversionCore::clientInfo( KURL path_or_url, bool recurse, TQMap< KURL, Sv
return true ; ;
}
void subversionCore : : slotEndCheckout ( K IO: : Job * job ) {
void subversionCore : : slotEndCheckout ( TDE IO: : Job * job ) {
if ( job - > error ( ) ) {
job - > showErrorDialog ( m_part - > mainWindow ( ) - > main ( ) ) ;
emit checkoutFinished ( TQString ( ) ) ;
@ -501,7 +501,7 @@ void subversionCore::slotEndCheckout( KIO::Job * job ) {
emit checkoutFinished ( wcPath ) ;
}
void subversionCore : : slotResult ( K IO: : Job * job ) {
void subversionCore : : slotResult ( TDE IO: : Job * job ) {
if ( job - > error ( ) ) {
job - > showErrorDialog ( m_part - > mainWindow ( ) - > main ( ) ) ;
if ( job - > error ( ) = = ERR_CANNOT_LAUNCH_PROCESS )
@ -512,7 +512,7 @@ void subversionCore::slotResult( KIO::Job * job ) {
) ) ;
return ;
}
K IO: : MetaData ma = job - > metaData ( ) ;
TDE IO: : MetaData ma = job - > metaData ( ) ;
TQValueList < TQString > keys = ma . keys ( ) ;
qHeapSort ( keys ) ;
TQValueList < TQString > : : Iterator begin = keys . begin ( ) , end = keys . end ( ) , it ;
@ -529,7 +529,7 @@ void subversionCore::slotResult( KIO::Job * job ) {
}
}
}
void subversionCore : : slotLogResult ( K IO: : Job * job )
void subversionCore : : slotLogResult ( TDE IO: : Job * job )
{
if ( job - > error ( ) ) {
job - > showErrorDialog ( m_part - > mainWindow ( ) - > main ( ) ) ;
@ -544,7 +544,7 @@ void subversionCore::slotLogResult( KIO::Job * job )
TQValueList < SvnLogHolder > holderList ;
K IO: : MetaData ma = job - > metaData ( ) ;
TDE IO: : MetaData ma = job - > metaData ( ) ;
TQValueList < TQString > keys = ma . keys ( ) ;
TQRegExp rx ( " ([0-9]*) ( . * ) " ) ;
int curIdx , lastIdx ;
@ -589,7 +589,7 @@ void subversionCore::slotLogResult( KIO::Job * job )
}
void subversionCore : : slotBlameResult ( K IO: : Job * job )
void subversionCore : : slotBlameResult ( TDE IO: : Job * job )
{
if ( job - > error ( ) ) {
job - > showErrorDialog ( m_part - > mainWindow ( ) - > main ( ) ) ;
@ -603,7 +603,7 @@ void subversionCore::slotBlameResult( KIO::Job * job )
}
TQValueList < SvnBlameHolder > blameList ;
K IO: : MetaData ma = job - > metaData ( ) ;
TDE IO: : MetaData ma = job - > metaData ( ) ;
TQValueList < TQString > keys = ma . keys ( ) ;
TQRegExp rx ( " ([0-9]*) ( . * ) " ) ;
int curIdx , lastIdx ;
@ -659,7 +659,7 @@ void subversionCore::slotBlameResult( KIO::Job * job )
m_part - > mainWindow ( ) - > raiseView ( processWidget ( ) ) ;
}
void subversionCore : : slotDiffResult ( K IO: : Job * job )
void subversionCore : : slotDiffResult ( TDE IO: : Job * job )
{
if ( job - > error ( ) ) {
job - > showErrorDialog ( m_part - > mainWindow ( ) - > main ( ) ) ;
@ -671,7 +671,7 @@ void subversionCore::slotDiffResult( KIO::Job * job )
) ) ;
return ;
}
K IO: : MetaData ma = job - > metaData ( ) ;
TDE IO: : MetaData ma = job - > metaData ( ) ;
TQValueList < TQString > keys = ma . keys ( ) ;
qHeapSort ( keys ) ;
TQValueList < TQString > : : Iterator begin = keys . begin ( ) , end = keys . end ( ) , it ;
@ -716,16 +716,16 @@ void subversionCore::slotDiffResult( KIO::Job * job )
}
}
void subversionCore : : initProcessDlg ( K IO: : Job * job , const TQString & src , const TQString & dest )
void subversionCore : : initProcessDlg ( TDE IO: : Job * job , const TQString & src , const TQString & dest )
{
SvnProgressDlg * progress = new SvnProgressDlg ( true ) ;
progress - > setSourceUrl ( src ) ;
progress - > setDestUrl ( dest ) ;
progress - > setJob ( job ) ;
connect ( job , TQT_SIGNAL ( totalSize ( KIO: : Job * , K IO: : filesize_t ) ) ,
progress , TQT_SLOT ( slotTotalSize ( KIO: : Job * , K IO: : filesize_t ) ) ) ;
connect ( job , TQT_SIGNAL ( processedSize ( KIO: : Job * , K IO: : filesize_t ) ) ,
progress , TQT_SLOT ( slotProcessedSize ( KIO: : Job * , K IO: : filesize_t ) ) ) ;
connect ( job , TQT_SIGNAL ( totalSize ( TDEIO: : Job * , TDE IO: : filesize_t ) ) ,
progress , TQT_SLOT ( slotTotalSize ( TDEIO: : Job * , TDE IO: : filesize_t ) ) ) ;
connect ( job , TQT_SIGNAL ( processedSize ( TDEIO: : Job * , TDE IO: : filesize_t ) ) ,
progress , TQT_SLOT ( slotProcessedSize ( TDEIO: : Job * , TDE IO: : filesize_t ) ) ) ;
}
void subversionCore : : createNewProject ( const TQString & // dirName