checkin for saving current state
This commit is contained in:
@@ -1,21 +1,44 @@
|
||||
#include "process/check_and_fetch_customer_repository_command.h"
|
||||
#include "worker.h"
|
||||
#include "utils_internal.h"
|
||||
|
||||
CheckAndFetchCustomerRepositoryCommand::CheckAndFetchCustomerRepositoryCommand(
|
||||
QString const &command, Worker *worker, int start_timeout, int finish_timeout)
|
||||
: UpdateCommand(command, worker, start_timeout, finish_timeout) {
|
||||
QString const &command, Worker *worker, int nextCommandIndex,
|
||||
int start_timeout, int finish_timeout)
|
||||
: UpdateCommand(command, worker, nextCommandIndex, start_timeout, finish_timeout) {
|
||||
}
|
||||
|
||||
void CheckAndFetchCustomerRepositoryCommand::finished(int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
qCritical() << __func__ << ":" << __LINE__ << command() << exitCode << exitStatus;
|
||||
Worker *w = worker();
|
||||
if (w) {
|
||||
switch (exitCode) {
|
||||
case -2:
|
||||
emit w->showCustRepoStatus(internal::GIT_CUSTOMER_REPO_CHECKOUT_ERROR);
|
||||
break;
|
||||
case -4:
|
||||
emit w->showCustRepoStatus(internal::GIT_CUSTOMER_REPO_PULL_ERROR);
|
||||
break;
|
||||
case 0:
|
||||
emit w->showCustRepoStatus(internal::GIT_CUSTOMER_REPO_UP_TO_DATE);
|
||||
default:;
|
||||
}
|
||||
}
|
||||
|
||||
return UpdateCommand::finished(exitCode, exitStatus);
|
||||
}
|
||||
|
||||
void CheckAndFetchCustomerRepositoryCommand::readyReadStandardOutput() {
|
||||
QProcess *p = (QProcess *)sender();
|
||||
if (p) {
|
||||
QString s = p->readAllStandardOutput();
|
||||
//QProcess *p = (QProcess *)sender();
|
||||
//if (p) {
|
||||
// Worker *w = worker();
|
||||
// if (w) {
|
||||
// QString s = p->readAllStandardOutput().trimmed();
|
||||
//
|
||||
// qCritical() << __func__ << ":" << __LINE__ << s;
|
||||
|
||||
// TODO
|
||||
Worker *w = worker();
|
||||
if (w) {
|
||||
// static constexpr const char *GIT_CUSTOMER_REPO_UP_TO_DATE{"up to date"};
|
||||
emit w->showCustRepoStatus(UpdateCommand::GIT_CUSTOMER_REPO_UP_TO_DATE);
|
||||
}
|
||||
}
|
||||
// emit w->showCustRepoStatus(UpdateCommand::GIT_CUSTOMER_REPO_UP_TO_DATE);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
Reference in New Issue
Block a user