|
|
@ -116,7 +116,7 @@ public:
|
|
|
|
delete m_LogDialog;
|
|
|
|
delete m_LogDialog;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<KProcess*,TQStringList>::iterator it;
|
|
|
|
TQMap<TDEProcess*,TQStringList>::iterator it;
|
|
|
|
for (it=m_tempfilelist.begin();it!=m_tempfilelist.end();++it) {
|
|
|
|
for (it=m_tempfilelist.begin();it!=m_tempfilelist.end();++it) {
|
|
|
|
for (TQStringList::iterator it2 = (*it).begin();
|
|
|
|
for (TQStringList::iterator it2 = (*it).begin();
|
|
|
|
it2 != (*it).end();++it2) {
|
|
|
|
it2 != (*it).end();++it2) {
|
|
|
@ -180,8 +180,8 @@ public:
|
|
|
|
/// \todo as persistent cache (sqlite?)
|
|
|
|
/// \todo as persistent cache (sqlite?)
|
|
|
|
helpers::itemCache<svn::InfoEntry> m_InfoCache;
|
|
|
|
helpers::itemCache<svn::InfoEntry> m_InfoCache;
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<KProcess*,TQStringList> m_tempfilelist;
|
|
|
|
TQMap<TDEProcess*,TQStringList> m_tempfilelist;
|
|
|
|
TQMap<KProcess*,TQStringList> m_tempdirlist;
|
|
|
|
TQMap<TDEProcess*,TQStringList> m_tempdirlist;
|
|
|
|
|
|
|
|
|
|
|
|
TQTimer m_ThreadCheckTimer;
|
|
|
|
TQTimer m_ThreadCheckTimer;
|
|
|
|
TQTimer m_UpdateCheckTimer;
|
|
|
|
TQTimer m_UpdateCheckTimer;
|
|
|
@ -601,7 +601,7 @@ void SvnActions::slotMakeCat(const svn::Revision&start, const TQString&what, con
|
|
|
|
if (co.size()) {
|
|
|
|
if (co.size()) {
|
|
|
|
KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Content of %1")).arg(disp),false,"cat_display_dlg");
|
|
|
|
KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Content of %1")).arg(disp),false,"cat_display_dlg");
|
|
|
|
if (dlg) {
|
|
|
|
if (dlg) {
|
|
|
|
ptr->setFont(KGlobalSettings::fixedFont());
|
|
|
|
ptr->setFont(TDEGlobalSettings::fixedFont());
|
|
|
|
ptr->setWordWrap(TQTextEdit::NoWrap);
|
|
|
|
ptr->setWordWrap(TQTextEdit::NoWrap);
|
|
|
|
ptr->setText(TQString::FROMUTF8(co,co.size()));
|
|
|
|
ptr->setText(TQString::FROMUTF8(co,co.size()));
|
|
|
|
dlg->exec();
|
|
|
|
dlg->exec();
|
|
|
@ -1036,16 +1036,16 @@ bool SvnActions::makeCommit(const svn::Targets&targets)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
\fn SvnActions::wroteStdin(KProcess*)
|
|
|
|
\fn SvnActions::wroteStdin(TDEProcess*)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void SvnActions::wroteStdin(KProcess*proc)
|
|
|
|
void SvnActions::wroteStdin(TDEProcess*proc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!proc) return;
|
|
|
|
if (!proc) return;
|
|
|
|
kdDebug()<<"void SvnActions::wroteStdin(KProcess*proc)"<<endl;
|
|
|
|
kdDebug()<<"void SvnActions::wroteStdin(TDEProcess*proc)"<<endl;
|
|
|
|
proc->closeStdin();
|
|
|
|
proc->closeStdin();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SvnActions::receivedStderr(KProcess*proc,char*buff,int len)
|
|
|
|
void SvnActions::receivedStderr(TDEProcess*proc,char*buff,int len)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!proc || !buff || len == 0) {
|
|
|
|
if (!proc || !buff || len == 0) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -1054,10 +1054,10 @@ void SvnActions::receivedStderr(KProcess*proc,char*buff,int len)
|
|
|
|
emit sendNotify(msg);
|
|
|
|
emit sendNotify(msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SvnActions::procClosed(KProcess*proc)
|
|
|
|
void SvnActions::procClosed(TDEProcess*proc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!proc) return;
|
|
|
|
if (!proc) return;
|
|
|
|
TQMap<KProcess*,TQStringList>::iterator it;
|
|
|
|
TQMap<TDEProcess*,TQStringList>::iterator it;
|
|
|
|
if ( (it=m_Data->m_tempfilelist.find(proc))!=m_Data->m_tempfilelist.end()) {
|
|
|
|
if ( (it=m_Data->m_tempfilelist.find(proc))!=m_Data->m_tempfilelist.end()) {
|
|
|
|
for (TQStringList::iterator it2 = (*it).begin();
|
|
|
|
for (TQStringList::iterator it2 = (*it).begin();
|
|
|
|
it2 != (*it).end();++it2) {
|
|
|
|
it2 != (*it).end();++it2) {
|
|
|
@ -1183,7 +1183,7 @@ void SvnActions::makeDiffExternal(const TQString&p1,const svn::Revision&start,co
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
KProcess*proc = new KProcess();
|
|
|
|
TDEProcess*proc = new TDEProcess();
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
if (*it=="%1") {
|
|
|
|
if (*it=="%1") {
|
|
|
|
*proc<<first;
|
|
|
|
*proc<<first;
|
|
|
@ -1193,10 +1193,10 @@ void SvnActions::makeDiffExternal(const TQString&p1,const svn::Revision&start,co
|
|
|
|
*proc << *it;
|
|
|
|
*proc << *it;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(TDEProcess*)),this,TQT_SLOT(procClosed(TDEProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::All)) {
|
|
|
|
if (proc->start(m_Data->runblocked?TDEProcess::Block:TDEProcess::NotifyOnExit,TDEProcess::All)) {
|
|
|
|
if (!m_Data->runblocked) {
|
|
|
|
if (!m_Data->runblocked) {
|
|
|
|
if (!isDir) {
|
|
|
|
if (!isDir) {
|
|
|
|
tfile2.setAutoDelete(false);
|
|
|
|
tfile2.setAutoDelete(false);
|
|
|
@ -1321,11 +1321,11 @@ void SvnActions::makeNorecDiff(const TQString&p1,const svn::Revision&r1,const TQ
|
|
|
|
void SvnActions::dispDiff(const TQByteArray&ex)
|
|
|
|
void SvnActions::dispDiff(const TQByteArray&ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString what = Kdesvnsettings::external_diff_display();
|
|
|
|
TQString what = Kdesvnsettings::external_diff_display();
|
|
|
|
int r = KProcess::Stdin|KProcess::Stderr;
|
|
|
|
int r = TDEProcess::Stdin|TDEProcess::Stderr;
|
|
|
|
|
|
|
|
|
|
|
|
if (Kdesvnsettings::use_external_diff() && (what.find("%1")==-1 || what.find("%2")==-1)) {
|
|
|
|
if (Kdesvnsettings::use_external_diff() && (what.find("%1")==-1 || what.find("%2")==-1)) {
|
|
|
|
TQStringList wlist = TQStringList::split(" ",what);
|
|
|
|
TQStringList wlist = TQStringList::split(" ",what);
|
|
|
|
KProcess*proc = new KProcess();
|
|
|
|
TDEProcess*proc = new TDEProcess();
|
|
|
|
bool fname_used = false;
|
|
|
|
bool fname_used = false;
|
|
|
|
KTempFile tfile;
|
|
|
|
KTempFile tfile;
|
|
|
|
tfile.setAutoDelete(false);
|
|
|
|
tfile.setAutoDelete(false);
|
|
|
@ -1342,12 +1342,12 @@ void SvnActions::dispDiff(const TQByteArray&ex)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(TDEProcess*)),this,TQT_SLOT(procClosed(TDEProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
if (!fname_used) {
|
|
|
|
if (!fname_used) {
|
|
|
|
connect(proc,TQT_SIGNAL(wroteStdin(KProcess*)),this,TQT_SLOT(wroteStdin(KProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(wroteStdin(TDEProcess*)),this,TQT_SLOT(wroteStdin(TDEProcess*)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (proc->start(KProcess::NotifyOnExit,fname_used?KProcess::Stderr:(KProcess::Communication)r)) {
|
|
|
|
if (proc->start(TDEProcess::NotifyOnExit,fname_used?TDEProcess::Stderr:(TDEProcess::Communication)r)) {
|
|
|
|
if (!fname_used) proc->writeStdin(ex,ex.size());
|
|
|
|
if (!fname_used) proc->writeStdin(ex,ex.size());
|
|
|
|
else m_Data->m_tempfilelist[proc].append(tfile.name());
|
|
|
|
else m_Data->m_tempfilelist[proc].append(tfile.name());
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -1924,7 +1924,7 @@ void SvnActions::slotResolve(const TQString&p)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KProcess*proc = new KProcess();
|
|
|
|
TDEProcess*proc = new TDEProcess();
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
if (*it=="%o"||*it=="%l") {
|
|
|
|
if (*it=="%o"||*it=="%l") {
|
|
|
|
*proc<<(base+"/"+i1.conflictOld());
|
|
|
|
*proc<<(base+"/"+i1.conflictOld());
|
|
|
@ -1938,10 +1938,10 @@ void SvnActions::slotResolve(const TQString&p)
|
|
|
|
*proc << *it;
|
|
|
|
*proc << *it;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(TDEProcess*)),this,TQT_SLOT(procClosed(TDEProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::All)) {
|
|
|
|
if (proc->start(m_Data->runblocked?TDEProcess::Block:TDEProcess::NotifyOnExit,TDEProcess::All)) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
emit sendNotify(i18n("Resolve-process could not started, check command."));
|
|
|
|
emit sendNotify(i18n("Resolve-process could not started, check command."));
|
|
|
@ -2076,7 +2076,7 @@ void SvnActions::slotMergeExternal(const TQString&_src1,const TQString&_src2, co
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TQString edisp = Kdesvnsettings::external_merge_program();
|
|
|
|
TQString edisp = Kdesvnsettings::external_merge_program();
|
|
|
|
TQStringList wlist = TQStringList::split(" ",edisp);
|
|
|
|
TQStringList wlist = TQStringList::split(" ",edisp);
|
|
|
|
KProcess*proc = new KProcess();
|
|
|
|
TDEProcess*proc = new TDEProcess();
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) {
|
|
|
|
if (*it=="%s1") {
|
|
|
|
if (*it=="%s1") {
|
|
|
|
*proc<<first;
|
|
|
|
*proc<<first;
|
|
|
@ -2088,9 +2088,9 @@ void SvnActions::slotMergeExternal(const TQString&_src1,const TQString&_src2, co
|
|
|
|
*proc << *it;
|
|
|
|
*proc << *it;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(processExited(TDEProcess*)),this,TQT_SLOT(procClosed(TDEProcess*)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int)));
|
|
|
|
connect(proc,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),this,TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
|
|
|
|
if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::Stderr)) {
|
|
|
|
if (proc->start(m_Data->runblocked?TDEProcess::Block:TDEProcess::NotifyOnExit,TDEProcess::Stderr)) {
|
|
|
|
if (!m_Data->runblocked) {
|
|
|
|
if (!m_Data->runblocked) {
|
|
|
|
tdir1.setAutoDelete(false);
|
|
|
|
tdir1.setAutoDelete(false);
|
|
|
|
m_Data->m_tempdirlist[proc].append(tdir1.name());
|
|
|
|
m_Data->m_tempdirlist[proc].append(tdir1.name());
|
|
|
|