mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#17579744 : if blank is included in svn_cmd quote svn_cmd with double quotation mark, and unquote for arguments
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5192 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
90154c59f3
commit
ae1081df80
1 changed files with 8 additions and 7 deletions
|
|
@ -19,7 +19,8 @@
|
|||
if(substr($url,-1)!='/') $url .= '/';
|
||||
$this->url = $url;
|
||||
|
||||
$this->svn_cmd = $svn_cmd;
|
||||
if(strstr($svn_cmd, " ") != FALSE) $this->svn_cmd = '"'.$svn_cmd.'"' ;
|
||||
else $this->svn_cmd = $svn_cmd;
|
||||
$this->diff_cmd = $diff_cmd;
|
||||
|
||||
$this->tmp_dir = _XE_PATH_.'files/cache/tmp';
|
||||
|
|
@ -32,7 +33,7 @@
|
|||
if(substr($path,0,1)=='/') $path = substr($path,1);
|
||||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 \"%s%s\"", $this->svn_cmd, $this->tmp_dir, $this->url, $path);
|
||||
$command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s%s", $this->svn_cmd, $this->tmp_dir, $this->url, $path);
|
||||
$buff = $this->execCmd($command, $error);
|
||||
$xmlDoc = $this->oXml->parse($buff);
|
||||
|
||||
|
|
@ -52,7 +53,7 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive --config-dir %s list "%s%s"%s',
|
||||
'%s --non-interactive --config-dir %s list %s%s%s',
|
||||
$this->svn_cmd,
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
|
|
@ -94,7 +95,7 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive --config-dir %s cat "%s%s"%s',
|
||||
'%s --non-interactive --config-dir %s cat %s%s%s',
|
||||
$this->svn_cmd,
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
|
|
@ -178,14 +179,14 @@
|
|||
|
||||
function getComp($path, $brev, $erev) {
|
||||
if(!$brev) {
|
||||
$command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 "%s%s@%d"', $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev);
|
||||
$command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $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 --config-dir %s diff "%s%s@%d" "%s%s@%d"',
|
||||
$command = sprintf('%s --non-interactive --config-dir %s diff %s%s@%d %s%s@%d',
|
||||
$this->svn_cmd,
|
||||
$this->tmp_dir,
|
||||
$this->url,
|
||||
|
|
@ -249,7 +250,7 @@
|
|||
if(strpos($path,'..')!==false) return;
|
||||
|
||||
$command = sprintf(
|
||||
'%s --non-interactive --config-dir %s log --xml %s %s %s "%s%s"',
|
||||
'%s --non-interactive --config-dir %s log --xml %s %s %s %s%s',
|
||||
$this->svn_cmd,
|
||||
$this->tmp_dir,
|
||||
$quiet?'--quiet':'--verbose',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue