Bug #18130 [Opn]: Problems with executing checkout

From: Date: Wed, 24 Oct 2012 20:51:48 +0000
Subject: Bug #18130 [Opn]: Problems with executing checkout
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9228@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=18130&edit=1 ID: 18130 Updated by: mrook@php.net Reported By: darko at uvcms dot com Summary: Problems with executing checkout Status: Open Type: Bug Package: VersionControl_SVN Operating System: Windows 2003 Package Version: 0.3.4 PHP Version: 5.2.12 -Roadmap Versions: +Roadmap Versions: 0.5.0 New Comment: -Roadmap Versions: +Roadmap Versions: 0.5.0 Previous Comments: ------------------------------------------------------------------------ [2012-09-03 22:38:52] mrook -Roadmap Versions: 0.4.0, 0.5.0 +Roadmap Versions: ------------------------------------------------------------------------ [2011-11-30 04:43:29] carcus88 try changing this line exec("$cmd 2>&1", $out, $ret_var); to this exec("\"$cmd 2>&1\"", $out, $ret_var); Does that work for you? Thats my issue for when there are spaces in the path name. ------------------------------------------------------------------------ [2010-12-21 15:15:20] kiklop Description: ------------ I have a server with IIS 6 and clean install of PHP 5.2.16 with latest PEAR. While trying to use phing I discovered that it is impossible to execute checkout because escapeshellargs screws the command line. Only when I comment this line in SVN.php in run method $cmd = str_replace($this->svn_path, escapeshellarg($this->svn_path), $cmd); checkout starts working. I have no antivirus, firewall or other kind of intrusive software. Test script: --------------- <?php require_once 'VersionControl/SVN.php'; $svnstack = PEAR_ErrorStack::singleton('VersionControl_SVN'); $options = array( 'fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ARRAY, 'svn_path' => 'E:/bin/svn/bin/svn.exe' ); $svn = VersionControl_SVN::factory('co', $options); $args = array( '--trust-server-cert', 'https://svn.filezilla-project.org/svn/FileZilla3/trunk/', 'E:/Temp/tt' ); // Run command $output = $svn->run($args); if ($output) { print_r($output); } else { if (count($errs = $svnstack->getErrors())) { foreach ($errs as $err) { echo '<br />'.$err['message']."<br />\n"; echo "Command used: " . $err['params']['cmd']; } } } Expected result: ---------------- This should checkout latest filezilla code in a specified folder. Actual result: -------------- E:\test>php svntest.php <br />The filename, directory name, or volume label syntax is incorrect. (cmd: "E:/bin/svn/bin/svn.exe" checkout -- non-interactive "--trust-server-cert" "https://svn.filezilla-project.org/svn/FileZilla3/trunk/" "E:/Temp/tt")<br /> Command used: "E:/bin/svn/bin/svn.exe" checkout --non-interactive "--trust-server-cert" "https://svn.filezilla-proj ect.org/svn/FileZilla3/trunk/" "E:/Temp/tt" ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=18130&edit=1

« previous php.pear.bugs (#9228) next »