FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=14114&edit=1

ID: 14114
Comment by: wilbuick@gmail.com
Reported By: alexander dot tumanovsky at envisionext dot com dot
ua
Summary: Delete command requires -m switch
Status: Closed
Type: Bug
Package: VersionControl_SVN
Operating System: Irrelevant
Package Version: 0.3.1
PHP Version: Irrelevant
Assigned To: mrook
Roadmap Versions:
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2009-08-09 19:55:06] mrook

-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.

------------------------------------------------------------------------

[2008-06-10 05:03:40] alexandertumanovsky

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)

------------------------------------------------------------------------

Search Discussions

  • Mrook at Sep 2, 2009 at 7:39 am
    Edit report at http://pear.php.net/bugs/bug.php?id=14114&edit=1

    ID: 14114
    Updated by: mrook@php.net
    Reported By: alexander dot tumanovsky at envisionext dot com dot
    ua
    Summary: Delete command requires -m switch
    -Status: Closed
    +Status: Open
    Type: Bug
    Package: VersionControl_SVN
    Operating System: Irrelevant
    Package Version: 0.3.1
    PHP Version: Irrelevant
    Assigned To: mrook
    -Roadmap Versions: 0.3.2
    +Roadmap Versions: 0.3.2, 0.3.3
    New Comment:

    -Status: Closed
    +Status: Open
    -Roadmap Versions: 0.3.2
    +Roadmap Versions: 0.3.2, 0.3.3



    Previous Comments:
    ------------------------------------------------------------------------

    [2009-09-02 04:46:32] wilbuick

    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-08-09 19:55:06] mrook

    -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.

    ------------------------------------------------------------------------

    [2008-06-10 05:03:40] alexandertumanovsky

    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)

    ------------------------------------------------------------------------
  • Mrook at Sep 2, 2009 at 7:53 am
    Edit report at http://pear.php.net/bugs/bug.php?id=14114&edit=1

    ID: 14114
    Updated by: mrook@php.net
    Reported By: alexander dot tumanovsky at envisionext dot com dot
    ua
    Summary: Delete command requires -m switch
    -Status: Assigned
    +Status: Closed
    Type: Bug
    Package: VersionControl_SVN
    Operating System: Irrelevant
    Package Version: 0.3.1
    PHP Version: Irrelevant
    Assigned To: mrook
    Roadmap Versions:
    New Comment:

    -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.




    Previous Comments:
    ------------------------------------------------------------------------

    [2009-09-02 09:39:15] mrook

    -Status: Closed
    +Status: Open
    -Roadmap Versions: 0.3.2
    +Roadmap Versions: 0.3.2, 0.3.3


    ------------------------------------------------------------------------

    [2009-09-02 04:46:32] wilbuick

    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-08-09 19:55:06] mrook

    -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.

    ------------------------------------------------------------------------

    [2008-06-10 05:03:40] alexandertumanovsky

    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)

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 2, '09 at 2:46a
activeSep 2, '09 at 7:53a
posts3
users2
websitepear.php.net

2 users in discussion

Mrook: 2 posts Wilbuick: 1 post

People

Translate

site design / logo © 2022 Grokbase