Home » Version Control » VersionControl_SVN » Bug #9351
log does not accept the 'limit' switch
Details
| Submitted | 2006-11-16 11:31 UTC |
|---|---|
| From | kikcho at gmail dot com |
| Assigned | clay |
| Status | Closed |
| Package | VersionControl_SVN |
| PHP Version | Irrelevant |
| OS | Any |
| Roadmaps | 0.3.1 |
Comments
[2006-11-16 11:31 UTC] kikcho at gmail dot com
Description:
------------
The log svn command will not accept a limit argument.
Test script:
---------------
<?
require_once('VersionControl/SVN.php');
$switches = array( 'username' => '',
'password' => '',
'limit' => '1'
);
$options = array( 'fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ASSOC);
$svn = VersionControl_SVN::factory('log', $options);
$result = $svn->run(array('svn://example.com/repos'), $switches);
echo "<pre>";
var_dump($svn->_prepped_cmd);
var_dump($result);
?>
Here is a patch to fix this behavior:
--- Log.php.orig 2006-11-16 11:33:26.000000000 +0000
+++ Log.php.new 2006-11-16 11:33:02.000000000 +0000
@@ -159,7 +159,8 @@
'non-interactive',
'non_interactive',
'config-dir',
- 'config_dir'
+ 'config_dir',
+ 'limit'
);
@@ -224,6 +225,7 @@
case 'username':
case 'password':
case 'config-dir':
+ case 'limit':
$_switches .= "--$switch $val ";
break;
case 'r':
Expected result:
----------------
You should only get a single log entry.
Actual result:
--------------
You see ALL log entries
[2006-11-16 11:33 UTC] kikcho at gmail dot com
Sorry about the bad-looking test script, my first post here.