Ignore:
Timestamp:
01/07/14 13:32:09 (16 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, releng/10.1.1, releng/10.1.2
Children:
4f9718b, e9a3917
Parents:
8f95077
Message:

Add system source branch detection to the system manager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.