| $cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($path)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($path)),␊ |
| escapeshellarg($rev));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| $xmlInfo = shell_exec($cmd);␊ |
|
| $cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --xml --username=%s --password=%s %s@%s',␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($folder)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($folder)),␊ |
| escapeshellarg($commit));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| $xml = simplexml_load_string(shell_exec($cmd));␊ |
|
| $cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($filename)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($filename)),␊ |
| escapeshellarg($rev));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| $xml = simplexml_load_string(shell_exec($cmd));␊ |
|
| $cmd = sprintf(Pluf::f('svn_path', 'svn').' cat --username=%s --password=%s %s@%s',␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($def->fullpath)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($def->fullpath)),␊ |
| escapeshellarg($def->rev));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| return ($cmd_only) ? $cmd : shell_exec($cmd);␊ |
|
| $cmd = sprintf(Pluf::f('svn_path', 'svn').' proplist --xml --username=%s --password=%s %s@%s',␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($path)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($path)),␊ |
| escapeshellarg($rev));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| $xmlProps = shell_exec($cmd);␊ |
|
| escapeshellarg($property),␊ |
| escapeshellarg($this->username),␊ |
| escapeshellarg($this->password),␊ |
| escapeshellarg($this->repo.'/'.urlencode($path)),␊ |
| escapeshellarg($this->repo.'/'.self::urlencode($path)),␊ |
| escapeshellarg($rev));␊ |
| $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;␊ |
| $xmlProp = shell_exec($cmd);␊ |
|
| $xml = simplexml_load_string($xmlInfo);␊ |
| return (string) $xml->entry->commit['revision'];␊ |
| }␊ |
| ␊ |
| ␊ |
| public static function urlencode($string)␊ |
| {␊ |
| return str_replace('%2F', '/', urlencode($string));␊ |
| }␊ |
| }␊ |
| ␊ |