mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
svn class의 tmp 디렉토리가 필요한 서버 환경이 있어서 롤백
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6597 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
88afc0defc
commit
85c5bba127
1 changed files with 15 additions and 6 deletions
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
var $svn_cmd = null;
|
||||
|
||||
var $tmp_dir = '/tmp';
|
||||
|
||||
var $oXml = null;
|
||||
var $userid = null;
|
||||
var $passwd = null;
|
||||
|
|
@ -21,6 +23,9 @@
|
|||
if(strstr($svn_cmd, " ") != FALSE) $this->svn_cmd = '"'.$svn_cmd.'"' ;
|
||||
else $this->svn_cmd = $svn_cmd;
|
||||
|
||||
$this->tmp_dir = _XE_PATH_.'files/cache/tmp';
|
||||
if(!is_dir($this->tmp_dir)) FileHandler::makeDir($this->tmp_dir);
|
||||
|
||||
$this->userid = $userid;
|
||||
$this->passwd = $passwd;
|
||||
|
||||
|
|
@ -43,7 +48,7 @@
|
|||
if(substr($path,0,1)=='/') $path = substr($path,1);
|
||||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf("%s --non-interactive log --xml --limit 1 %s %s%s", $this->svn_cmd, $this->_getAuthInfo(), $this->url, $path);
|
||||
$command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s %s%s", $this->svn_cmd, $this->tmp_dir, $this->_getAuthInfo(), $this->url, $path);
|
||||
$buff = $this->execCmd($command, $error);
|
||||
$xmlDoc = $this->oXml->parse($buff);
|
||||
|
||||
|
|
@ -63,9 +68,10 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive %s list %s%s%s',
|
||||
'%s --non-interactive %s --config-dir %s list %s%s%s',
|
||||
$this->svn_cmd,
|
||||
$this->_getAuthInfo(),
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
$path,
|
||||
$revs?'@'.(int)$revs:null
|
||||
|
|
@ -104,9 +110,10 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive %s cat %s%s%s',
|
||||
'%s --non-interactive %s --config-dir %s cat %s%s%s',
|
||||
$this->svn_cmd,
|
||||
$this->_getAuthInfo(),
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
$path,
|
||||
$revs?'@'.$revs:null
|
||||
|
|
@ -197,16 +204,17 @@
|
|||
|
||||
function getComp($path, $brev, $erev) {
|
||||
if(!$brev) {
|
||||
$command = sprintf('%s --non-interactive %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->_getAuthInfo(), $this->url, $path, $erev);
|
||||
$command = sprintf('%s --non-interactive %s --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, $erev);
|
||||
$buff = $this->execCmd($command, $error);
|
||||
$xmlDoc = $this->oXml->parse($buff);
|
||||
$brev = $xmlDoc->log->logentry[1]->attrs->revision;
|
||||
if(!$brev) return;
|
||||
}
|
||||
|
||||
$command = sprintf('%s --non-interactive %s diff %s%s@%d %s%s@%d',
|
||||
$command = sprintf('%s --non-interactive %s --config-dir %s diff %s%s@%d %s%s@%d',
|
||||
$this->svn_cmd,
|
||||
$this->_getAuthInfo(),
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
$path,
|
||||
$brev,
|
||||
|
|
@ -225,9 +233,10 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive %s log --xml %s %s %s %s%s',
|
||||
'%s --non-interactive %s --config-dir %s log --xml %s %s %s %s%s',
|
||||
$this->svn_cmd,
|
||||
$this->_getAuthInfo(),
|
||||
$this->tmp_dir,
|
||||
$quiet?'--quiet':'--verbose',
|
||||
$limit?'--limit '.$limit:'',
|
||||
$erev>0?(sprintf('-r%d:%d',(int)$erev, (int)$brev)):'',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue