diff --git a/UpdatePTUDevCtrl/worker.cpp b/UpdatePTUDevCtrl/worker.cpp index f334015..72bb787 100644 --- a/UpdatePTUDevCtrl/worker.cpp +++ b/UpdatePTUDevCtrl/worker.cpp @@ -333,6 +333,7 @@ void Worker::privateUpdate() { m_clone = false; m_repairClone = false; m_initialClone = false; + m_pulledNewBranch = false; // the customer repository is cloned or // repaired/re-cloned without checking the // ISMAS-trigger (WAIT-)button. @@ -727,6 +728,35 @@ bool Worker::customerEnvironment() { ISMAS() << (GUI() << (CONSOLE() << UPDATE_STEP::CHECKOUT_BRANCH)); if (QDir(m_customerRepository).exists()) { + if (m_clone == false) { + if (m_gc.branchExistsRemotely()) { + QString msg("PULL NEW BRANCH " + m_branchName); + QStringList lst(msg); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::PULL_NEW_BRANCH)); + if (!m_gc.branchExistsLocally()) { + msg = QString("PULLING OF NEW BRANCH " + m_branchName + " DOES NOT EXIST LOCALLY"); + QStringList lst(msg); + CONSOLE(lst) << UPDATE_STEP::PULL_NEW_BRANCH; + if (!m_gc.gitPullNewBranches()) { + msg = QString("PULLING OF NEW BRANCH " + m_branchName + "FAILED"); + QStringList lst(msg); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::PULL_NEW_BRANCH_FAILURE))); + return false; + } else { + msg = QString("PULLING OF NEW BRANCH " + m_branchName + "SUCCESS"); + QStringList lst(msg); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::PULL_NEW_BRANCH_SUCCESS))); + m_pulledNewBranch = true; + } + } else { + msg = QString("PULLING ALREADY EXISTING LOCAL BRANCH " + m_branchName + "SUCCESS"); + QStringList lst(msg); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::PULL_NEW_BRANCH_SUCCESS))); + m_pulledNewBranch = true; + } + } + } + if (m_gc.gitCheckoutBranch()) { return true; } else {