Index: VC.php =================================================================== RCS file: /repository/framework/VC/VC.php,v retrieving revision 1.25 diff -u -r1.25 VC.php --- VC.php 24 Jan 2007 17:47:42 -0000 1.25 +++ VC.php 28 Feb 2007 22:35:59 -0000 @@ -63,11 +63,7 @@ function getPath($binary) { if (isset($this->_paths[$binary])) { - if (VC_WINDOWS) { - return $this->_paths[$binary]; - } else { - return is_executable($this->_paths[$binary]) ? $this->_paths[$binary] : false; - } + return $this->_paths[$binary]; } return false; Index: VC/svn.php =================================================================== RCS file: /repository/framework/VC/VC/svn.php,v retrieving revision 1.46 diff -u -r1.46 svn.php --- VC/svn.php 12 May 2006 04:44:42 -0000 1.46 +++ VC/svn.php 28 Feb 2007 22:36:00 -0000 @@ -10,6 +10,7 @@ * @since Horde 3.0 * @package VC */ + class VC_svn extends VC { /** @@ -33,6 +34,14 @@ return true; } + function getCommand() + { + $svnPath = $this->getPath('svn'); + $tempDir = $this->_paths['cvsps_home']; + $command = $svnPath . ' --non-interactive --config-dir ' . $tempDir; + return $command; + } + function &queryDir($where) { $dir = new VC_Directory_svn($this, $where); @@ -101,7 +110,7 @@ } $Q = VC_WINDOWS ? '"' : "'"; - $command = $this->SVN->getPath('svn') . ' annotate -r 1:' . $rev . ' ' . $Q . str_replace($Q, '\\' . $Q, $this->file->queryFullPath()) . $Q . ' 2>&1'; + $command = $this->SVN->getCommand() . ' annotate -r 1:' . $rev . ' ' . $Q . str_replace($Q, '\\' . $Q, $this->file->queryFullPath()) . $Q . ' 2>&1'; $pipe = popen($command, 'r'); if (!$pipe) { return PEAR::raiseError('Failed to execute svn annotate: ' . $command); @@ -159,7 +168,7 @@ $mode = 'r'; } - if (!($RCS = popen($rep->getPath('svn') . ' cat -r ' . $rev . ' ' . $Q . str_replace($Q, '\\' . $Q, $fullname) . $Q . ' 2>&1', $mode))) { + if (!($RCS = popen($rep->getCommand() . ' cat -r ' . $rev . ' ' . $Q . str_replace($Q, '\\' . $Q, $fullname) . $Q . ' 2>&1', $mode))) { return PEAR::raiseError('Couldn\'t perform checkout of the requested file'); } @@ -233,7 +242,7 @@ // TODO: add options for $hr options - however these may not // be compatible with some diffs. $Q = VC_WINDOWS ? '"' : "'"; - $command = $rep->getPath('svn') . " diff --diff-cmd " . $rep->getPath('diff') . " -r $rev1:$rev2 -x " . $Q . $options . $Q . ' ' . $file->queryFullPath() . ' 2>&1'; + $command = $rep->getCommand() . " diff --diff-cmd " . $rep->getPath('diff') . " -r $rev1:$rev2 -x " . $Q . $options . $Q . ' ' . $file->queryFullPath() . ' 2>&1'; exec($command, $diff, $retval); return $diff; @@ -314,7 +323,7 @@ function browseDir($cache = null, $quicklog = true, $showattic = false) { $Q = VC_WINDOWS ? '"' : "'" ; - $cmd = $this->rep->getPath('svn') . ' ls ' . $Q . str_replace($Q, '\\' . $Q, $this->rep->sourceroot() . $this->queryDir()) . $Q . ' 2>&1'; + $cmd = $this->rep->getCommand() . ' ls ' . $Q . str_replace($Q, '\\' . $Q, $this->rep->sourceroot() . $this->queryDir()) . $Q . ' 2>&1'; $dir = popen($cmd, 'r'); if (!$dir) { return PEAR::raiseError('Failed to execute svn ls: ' . $cmd); @@ -656,7 +665,7 @@ * $flag = $this->quicklog ? '-r HEAD ' : ''; */ $flag = ''; $Q = VC_WINDOWS ? '"' : "'"; - $cmd = $this->rep->getPath('svn') . ' log -v ' . $flag . $Q . str_replace($Q, '\\' . $Q, $this->queryFullPath()) . $Q . ' 2>&1'; + $cmd = $this->rep->getCommand() . ' log -v ' . $flag . $Q . str_replace($Q, '\\' . $Q, $this->queryFullPath()) . $Q . ' 2>&1'; $pipe = popen($cmd, 'r'); if (!$pipe) { return PEAR::raiseError('Failed to execute svn log: ' . $cmd);