|
|
|
@ -68,7 +68,7 @@ svn::Revision svn::cache::ReposLog::latestCachedRev()
|
|
|
|
|
TQString q("select revision from 'logentries' order by revision DESC limit 1");
|
|
|
|
|
TQSqlQuery _q(TQString(), m_Database);
|
|
|
|
|
if (!_q.exec(q)) {
|
|
|
|
|
tqDebug("%s", TQString(_q.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", _q.lastError().text().TOUTF8().data());
|
|
|
|
|
return svn::Revision::UNDEFINED;
|
|
|
|
|
}
|
|
|
|
|
int _r;
|
|
|
|
@ -76,7 +76,7 @@ svn::Revision svn::cache::ReposLog::latestCachedRev()
|
|
|
|
|
//tqDebug("Sel result: %s",_q.value(0).toString().TOUTF8().data());
|
|
|
|
|
_r = _q.value(0).toInt();
|
|
|
|
|
} else {
|
|
|
|
|
tqDebug("%s", TQString(_q.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", _q.lastError().text().TOUTF8().data());
|
|
|
|
|
return svn::Revision::UNDEFINED;
|
|
|
|
|
}
|
|
|
|
|
return _r;
|
|
|
|
@ -197,7 +197,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
|
|
|
|
|
bcount.bindValue(0,TQ_LLONG(end.revnum()));
|
|
|
|
|
bcount.bindValue(1,TQ_LLONG(start.revnum()));
|
|
|
|
|
if (!bcount.exec()) {
|
|
|
|
|
tqDebug("%s", TQString(bcount.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", bcount.lastError().text().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not retrieve count: ")+bcount.lastError().text());
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -211,7 +211,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
|
|
|
|
|
bcur.bindValue(1,TQ_LLONG(start.revnum()));
|
|
|
|
|
|
|
|
|
|
if (!bcur.exec()) {
|
|
|
|
|
tqDebug("%s", TQString(bcur.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", bcur.lastError().text().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+bcur.lastError().text());
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -220,7 +220,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
|
|
|
|
|
revision = bcur.value(0).toLongLong();
|
|
|
|
|
cur.bindValue(0,revision);
|
|
|
|
|
if (!cur.exec()) {
|
|
|
|
|
tqDebug("%s", TQString(cur.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", cur.lastError().text().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text()
|
|
|
|
|
,cur.lastError().number());
|
|
|
|
|
return false;
|
|
|
|
@ -264,7 +264,7 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
|
|
|
|
|
TQSqlQuery query("select revision,date from logentries order by revision desc limit 1",m_Database);
|
|
|
|
|
|
|
|
|
|
if (query.lastError().type()!=TQSqlError::None) {
|
|
|
|
|
tqDebug("%s", TQString(query.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", query.lastError().text().TOUTF8().data());
|
|
|
|
|
}
|
|
|
|
|
bool must_remote=!noNetwork;
|
|
|
|
|
if (query.next()) {
|
|
|
|
@ -283,7 +283,7 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
|
|
|
|
|
query.bindValue(0,TQ_LLONG(aRev.date()));
|
|
|
|
|
query.exec();
|
|
|
|
|
if (query.lastError().type()!=TQSqlError::None) {
|
|
|
|
|
tqDebug("%s", TQString(query.lastError().text().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", query.lastError().text().TOUTF8().data());
|
|
|
|
|
}
|
|
|
|
|
if (query.next()) {
|
|
|
|
|
return query.value(0).toInt();
|
|
|
|
@ -320,7 +320,7 @@ bool svn::cache::ReposLog::_insertLogEntry(const svn::LogEntry&aEntry)
|
|
|
|
|
if (!_q.exec()) {
|
|
|
|
|
m_Database->rollback();
|
|
|
|
|
tqDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
|
|
|
|
|
tqDebug("%s", TQString(_q.lastQuery().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", _q.lastQuery().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
|
|
|
|
|
}
|
|
|
|
|
_q.prepare(qPathes);
|
|
|
|
@ -334,7 +334,7 @@ bool svn::cache::ReposLog::_insertLogEntry(const svn::LogEntry&aEntry)
|
|
|
|
|
if (!_q.exec()) {
|
|
|
|
|
m_Database->rollback();
|
|
|
|
|
tqDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
|
|
|
|
|
tqDebug("%s", TQString(_q.lastQuery().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", _q.lastQuery().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -375,7 +375,7 @@ bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start,
|
|
|
|
|
_q.prepare(query_string);
|
|
|
|
|
if (!_q.exec()) {
|
|
|
|
|
tqDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
|
|
|
|
|
tqDebug("%s", TQString(_q.lastQuery().TOUTF8().data()).ascii());
|
|
|
|
|
tqDebug("%s", _q.lastQuery().TOUTF8().data());
|
|
|
|
|
throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
|
|
|
|
|
}
|
|
|
|
|
while(_q.next()) {
|
|
|
|
|