|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57607 [PATCH NEEDED] Add support for switches
Submitted: 2007-04-04 23:31 UTC Modified: 2011-05-31 22:32 UTC
From: edwardzyang at thewritingpot dot com Assigned:
Status: Verified Package: svn (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: edwardzyang at thewritingpot dot com
New email:
PHP Version: OS:


 [2007-04-04 23:31 UTC] edwardzyang at thewritingpot dot com
Support for some/all of the switches that the usual SVN executable supports would be highly appreciated. A concrete example of where this would be useful is the svn_log() function: currently it's an all-or-nothing proposition, returning every log message in all the history of the item, or returning a single log message from a single revision. The ability to use the --limit NUM switch is not only helpful: it's necessary! Otherwise, the function is extremely inefficient and, for items with revisions in the thousands, useless.

See for documentation on the switches. Not all switches are supported by all functions.

Because each action supports so many switches, I think that passing them in as an array would be most suitable. More information is detailed below.

This probably requires a lot of effort, judging from the current source code, it doesn't look like the SVN libraries natively support these switches. You may want to prioritize based on the "must have" switches versus the "ah, they can wait" switches. I can provide a list, if you want, of what I consider to be "must have" switches, but you should probably use your judgment, as you'd be the one writing the code (sorry, for me, C is read-only).

Reproduce code:
Here's a possible use-case:

$logs = svn_log(
  -2, // we want all revisions...
    'limit' => 10, // ...but only the first ten...
    'stop-on-copy' => true // ...and don't go too deep!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-26 10:57 UTC]
Part of the problem is that the extension is using older APIs before the flag was added.

I'm slowly moving things up to 1.4 which will make the transition slightly easier.

If you have a list of switches that would be nice to have I'll make them a priority.
 [2008-03-02 22:36 UTC] alan at akbkhome dot com
this is supported in the lastest release
 proto array svn_log(string repos_url[, int start_revision =  Svn::HEAD, [, int end_revision = Svn::INITIAL [, int limit [, int flags ]]]])

 [2008-03-04 19:45 UTC]
There are more than just svn_log that have new flags added. I 
can see a few in svn_commit and other places.
 [2008-03-12 18:13 UTC] pecl at xaospage dot de
SVN_OMIT_MESSAGES is default with 0.30 "4", i have no idea what does it there any documentation about the constants?

 [2011-05-31 22:32 UTC] alan at akbkhome dot com
svn_commit can be changed - patch or commit needed
 [2023-04-10 10:45 UTC] googdmorning1 at gmail dot com
Higer Education News are sharing latest news about higher education, post gradute education, school, college, exam, university etc. More info to visit: (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 16:01:27 2024 UTC