Skip to content
Snippets Groups Projects
Commit a798d6aa authored by hahn's avatar hahn
Browse files

task#1847 - smail fixes:

- getRevision writes git output to log (requires enabled debugging to see it)
- added check for tmpdir
parent 62478f6d
No related branches found
No related tags found
No related merge requests found
......@@ -160,6 +160,7 @@ if (!isset($aConfig) || !is_array($aConfig)) {
'buildDefaultsDir',
'packageDir',
'archiveDir',
'tmpDir',
) as $sKey) {
checkdir($aConfig[$sKey], $sKey);
}
......
......@@ -261,6 +261,8 @@ class vcs implements iVcs {
}
$this->_aRemoteBranches = $aReturn;
$oCache->write($aReturn, $iTtl);
} else {
$this->log(__FUNCTION__." FAILD with rc=$iRc $sGitCmd", 'error');
}
} else {
$this->_aRemoteBranches = $oCache->read();
......@@ -360,6 +362,8 @@ class vcs implements iVcs {
public function getRevision($sWorkDir = false) {
$this->log(__FUNCTION__." start");
$aReturn = array();
$aOutput=array();
$iRc=false;
if (!$this->getUrl()) {
return false;
}
......@@ -385,8 +389,11 @@ class vcs implements iVcs {
$sGitCmd.='git log -1 "' . $this->_sCurrentBranch . '" 2>&1 ; '; // 0.0 s
$this->log(__FUNCTION__." start command $sGitCmd");
$sLoginfo = shell_exec($sGitCmd);
$this->log(__FUNCTION__." end command $sGitCmd");
// $sLoginfo = shell_exec($sGitCmd);
exec($sGitCmd, $aOutput, $iRc);
$sLoginfo= implode("\n", $aOutput);
$this->log(__FUNCTION__." end with rc=$iRc <pre>$sLoginfo</pre>", ($iRc==0 ? 'info':'error'));
/*
*
* example output:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment