␊ |
public function isAvailable()␊ |
{␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo));␊ |
|
return IDF_Scm::REVISION_VALID;␊ |
}␊ |
␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo),␊ |
|
}␊ |
␊ |
// Else, test the path on revision␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/'.self::smartEncode($path)),␊ |
|
␊ |
public function getTree($commit, $folder='/', $branch=null)␊ |
{␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --xml --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --xml --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/'.self::smartEncode($folder)),␊ |
|
if (isset($this->cache['commitmess'][$rev])) {␊ |
return $this->cache['commitmess'][$rev];␊ |
}␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml --limit 1 --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo),␊ |
|
if ($rev == null) {␊ |
$rev = 'HEAD';␊ |
}␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/'.self::smartEncode($filename)),␊ |
|
␊ |
public function getFile($def, $cmd_only=false)␊ |
{␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' cat --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' cat --no-auth-cache --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/'.self::smartEncode($def->fullpath)),␊ |
|
return $this->cache['branches'];␊ |
}␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --username=%s --password=%s %s@HEAD',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --username=%s --password=%s %s@HEAD',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/branches'));␊ |
|
}␊ |
}␊ |
ksort($res);␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --username=%s --password=%s %s@HEAD',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --username=%s --password=%s %s@HEAD',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/trunk'));␊ |
|
return $this->cache['tags'];␊ |
}␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --username=%s --password=%s %s@HEAD',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --username=%s --password=%s %s@HEAD',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/tags'));␊ |
|
return false;␊ |
}␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 -v --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml --limit 1 -v --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo),␊ |
|
private function getDiff($rev='HEAD')␊ |
{␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' diff -c %s --username=%s --password=%s %s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' diff --no-auth-cache -c %s --username=%s --password=%s %s',␊ |
escapeshellarg($rev),␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
|
$branch = 'HEAD';␊ |
}␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml -v --limit %s --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml -v --limit %s --username=%s --password=%s %s@%s',␊ |
escapeshellarg($n),␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
|
public function getProperties($rev, $path='')␊ |
{␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' proplist --xml --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' proplist --no-auth-cache --xml --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo.'/'.self::smartEncode($path)),␊ |
|
private function getProperty($property, $rev, $path='')␊ |
{␊ |
$res = array();␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' propget --xml %s --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' propget --no-auth-cache --xml %s --username=%s --password=%s %s@%s',␊ |
escapeshellarg($property),␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
|
public function getLastCommit($rev='HEAD')␊ |
{␊ |
$xmlInfo = '';␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',␊ |
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',␊ |
escapeshellarg($this->username),␊ |
escapeshellarg($this->password),␊ |
escapeshellarg($this->repo),␊ |