|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58277 svn_export should have parameter revision
Submitted: 2008-07-16 21:42 UTC Modified: 2010-02-07 23:51 UTC
From: bjoern at xrow dot de Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5.2.5 OS: whatever
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bjoern at xrow dot de
New email:
PHP Version: OS:


 [2008-07-16 21:42 UTC] bjoern at xrow dot de

it could be quite handy if svn_export has parameter revision.

svn_export(string frompath, string topath[, revision][, bool working_copy = true])

Reproduce code:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-05 17:45 UTC] lostoutfrog at yahoo dot co dot uk
If I'm not mistaken, we could have something like (I just copied the part that would change):
/* {{{ proto resource svn_export(string frompath, string topath [, int revision = SVN_REVISION_HEAD[, bool working_copy = true]])
	Export the contents of either a working copy or repository into a 'clean' directory.
	If working_copy is true it will export uncommitted files from a working copy. */
	const char *from = NULL, *to = NULL;
	const char *utf8_from_path = NULL, *utf8_to_path = NULL;
	int fromlen, tolen, rev;
	apr_pool_t *subpool;
	zend_bool working_copy = 1;
	svn_error_t *err;
	svn_opt_revision_t revision, peg_revision;

	if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|lb",
				&from, &fromlen, &to, &tolen, &rev, &working_copy)) {
if (working_copy) {
		peg_revision.kind = svn_opt_revision_working;
	} else {
		peg_revision.kind = svn_opt_revision_head;
	peg_revision.kind = svn_opt_revision_unspecified;
	revision.kind = svn_opt_revision_number;
	revision.value = rev;

	err = svn_client_export3(NULL, from, to, &peg_revision, &revision, TRUE, FALSE, TRUE, NULL, SVN_G(ctx), subpool);
I can't do the built to validate that but I'm fairly confident.
If one of you guys could include that in the next release, it'd be great since I could use that then :)
 [2010-02-07 23:51 UTC] alan at akbkhome dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Could you check the version in svn

The location of the 'rev' has to be at the end to prevent 
Backward compatibility breaks.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jul 08 02:01:27 2020 UTC