If customer-repo is already existent (i.e. not cloned),
then check for the existence of remote branch (zg/zone<zone-number of psa>). If it exists remotely, but not locally, then execute 'git pull' (could also be 'git pull origin zg1/zone<zone-number>'). A follwing 'git checkout zg1/zone<zone-number>' will switch to the now local branch.
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user