Changeset 8a4c7a0


Ignore:
Timestamp:
01/07/14 13:32:09 (12 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
4f9718b, e9a3917
Parents:
8f95077
Message:

Add system source branch detection to the system manager.

Location:
src-qt4/pc-sysmanager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-sysmanager/cmdDialog.cpp

    r8f95077 r8a4c7a0  
    1717} 
    1818 
    19 void CMDDialog::start(QString cmdtype){ 
     19void CMDDialog::start(QString cmdtype, QString branch){ 
    2020  if(PROC->isRunning()){ 
    2121    qDebug() << "ERROR: Process is already working: please wait until it is finished"; 
     
    6969    //Now create the git update commands 
    7070    cmds << "git fetch --depth=1"; info << "Fetch new GIT info (this may take a while)"; dirs << "/usr/src/.git"; 
    71     cmds << "git checkout master"; info << "Checkout the right version of the tree"; dirs << "/usr/src";  
     71    cmds << "git checkout "+branch; info << "Checkout the right version of the tree"; dirs << "/usr/src";  
    7272  }else{ 
    7373    ui->textEdit->setPlainText("Unknown CMD Type: "+cmdtype); 
  • src-qt4/pc-sysmanager/cmdDialog.h

    r8f95077 r8a4c7a0  
    1919        ~CMDDialog(); 
    2020 
    21         void start(QString cmdtype); 
     21        void start(QString cmdtype, QString branch = ""); 
    2222        bool isRunning(); 
    2323 
  • src-qt4/pc-sysmanager/pbsystemtab.cpp

    r8f95077 r8a4c7a0  
    213213      QMessageBox::warning(this, tr("Process Already Running"), tr("You already have a process running. Please wait for that one to finish first.") ); 
    214214    }else{ 
    215       cmdDlg->start("source"); //Version not implemented yet 
     215      //Get the current version branch of the source tree 
     216      QString version = pcbsd::Utils::runShellCommand("uname -r").join(" "); 
     217      QString branch; 
     218      if(version.contains("RELEASE")){ branch = "releng/"+version.section("-",0,0).simplified(); } 
     219      else if(version.contains("STABLE")){ branch = "stable/"+version.section("-",0,0).section(".",0,0).simplified(); } 
     220      else{ branch = "master"; } //CURRENT 
     221       
     222      cmdDlg->start("source", branch); //Version not implemented yet 
    216223      cmdDlg->show(); 
    217224    } 
Note: See TracChangeset for help on using the changeset viewer.