Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.2

Bug #14114 Delete command requires -m switch
Submitted: 2008-06-10 09:03 UTC
From: alexandertumanovsky Assigned: mrook
Status: Closed Package: VersionControl_SVN (version 0.3.1)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 0.3.3, 0.3.2    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 - 35 = ?

 
 [2008-06-10 09:03 UTC] alexandertumanovsky (Alexander Tumanovsky)
Description: ------------ VersionControl_SVN_Delete requires -m parameter to always be specified, however local non-commit operations do not take a log message: svn: Local, non-commit operations do not take a log message (cmd: /usr/bin/svn delete -m "Delete using Templates Editor" web/sites/2/design/1/Affiliates/templates_editor_test_file.txt) Test script: --------------- <?php $options = array( 'fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW, 'svn_path' => '/usr/bin/svn', 'url' => 'http://svn.example.com/', 'username' => 'root', 'password' => 'toor', ); $svn = VersionControl_SVN::factory(array('del'), $options); $svn->run(array('local/path/to/deletable/file')); //no message switch passed cause we work in local working copy $svnstack = &PEAR_ErrorStack::singleton('VersionControl_SVN'); if (count($errs = $svnstack->getErrors())) { foreach ($errs as $err) { echo '<br />'.$err['message']."<br />\n"; echo "Command used: " . $err['params']['cmd']; echo $svn->_prepped_cmd; } } var_dump(file_exists('local/path/to/deletable/file')); Expected result: ---------------- boolean(false) Actual result: -------------- svn delete requires the following switch: (m|message|F|file) boolean(true)

Comments

 [2009-08-09 23:55 UTC] mrook (Michiel Rook)
-Status: Open +Status: Closed -Assigned To: +Assigned To: mrook
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2009-09-02 08:46 UTC] wilbuick (William Buick)
In your latest release 0.3.2 you have fixed this incorrectly which creates other issues. The original patch was correct, however the code in 0.3.2 is the following: @@ -194,7 +194,7 @@ * @var array * @access public */ var $required_switches = array(''); /** * Use exec or passthru to get results from command. You can't specify an empty string inside that array, otherwise it complains that you're missing the switch (). You can't add an empty string as a switch when you call the method because it is not in the list of valid switches. Basically it means that you can't run the delete() command in this release.
 [2009-09-02 13:39 UTC] mrook (Michiel Rook)
-Status: Closed +Status: Open -Roadmap Versions: 0.3.2 +Roadmap Versions: 0.3.2, 0.3.3
 [2009-09-02 13:53 UTC] mrook (Michiel Rook)
-Status: Assigned +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.