php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #58061 missing [paths] in svn_log()
Submitted: 2008-02-25 13:37 UTC Modified: 2008-03-04 20:43 UTC
From: h dot aling at home dot nl Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5.2.3 OS: Linux/Ubuntu 7.10
Private report: No CVE-ID: None
 [2008-02-25 13:37 UTC] h dot aling at home dot nl
Description:
------------
Dear Devs,

As the svn_log() manual describes, the returned array should have a [paths] => Array, describing changed files.


I've fiddled around with "svn_auth_set_parameter(SVN_DISCOVER_CHANGED_PATHS, 1);" to no avail...

I already discovered the from...to parameter in v0.3:
$log = svn_log(
  "svn://server/", // path
  2, // from revision ...
  1, // ... to revision
);

How do I enable the [paths] array to show up?

Reproduce code:
---------------
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, '');
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, '');
svn_auth_set_parameter(SVN_DISCOVER_CHANGED_PATHS, 1);

$log = svn_log(
  "svn://server/", // path
  2, // from revision ...
  1 // ... to revision
);
var_dump($log);

Expected result:
----------------
array(2) {
  [0]=>
  array(4) {
    ["rev"]=>
    int(2)
    ["author"]=>
    string(6) "harold"
    ["msg"]=>
    string(7) "..."
    ["date"]=>
    string(27) "2008-02-25T16:44:24.861415Z"
    ["paths"] => array(
--> 'paths' array here
    )
  }
  [1]=>
  array(4) {
    ["rev"]=>
    int(2)
    ["author"]=>
    string(6) "harold"
    ["msg"]=>
    string(23) "..."
    ["date"]=>
    string(27) "2008-02-25T12:22:04.488456Z"
    ["paths"] => array(
--> 'paths' array here
    )
  }
}

Actual result:
--------------
array(2) {
  [0]=>
  array(4) {
    ["rev"]=>
    int(2)
    ["author"]=>
    string(6) "harold"
    ["msg"]=>
    string(7) "..."
    ["date"]=>
    string(27) "2008-02-25T16:44:24.861415Z"
  }
  [1]=>
  array(4) {
    ["rev"]=>
    int(2)
    ["author"]=>
    string(6) "harold"
    ["msg"]=>
    string(23) "..."
    ["date"]=>
    string(27) "2008-02-25T12:22:04.488456Z"
  }
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-25 16:28 UTC] h dot aling at home dot nl
typo
 [2008-02-25 21:29 UTC] alan at akbkhome dot com
The release announcement missed this I think.
** Please add comment to the manual though!

svn_log(string repos_url[, int start_revision =  Svn::HEAD, [, int end_revision = Svn::INITIAL [, int limit [, int fl
ags ]]]])
flags = SVN_DISCOVER_CHANGED_PATHS

other options for flags:
SVN_STOP_ON_COPY,SVN_OMIT_MESSAGES
 [2008-03-04 20:43 UTC] scottmac@php.net
I've changed what is in CVS to match the old behaviour, the 
default flags will include changed paths and stop on copy.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 20:01:26 2019 UTC