|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-07-16 21:42 UTC] bjoern at xrow dot de
Description: ------------ Hi, it could be quite handy if svn_export has parameter revision. svn_export(string frompath, string topath[, revision][, bool working_copy = true]) Reproduce code: --------------- na Expected result: ---------------- na Actual result: -------------- na PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 20:00:01 2025 UTC |
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. */ PHP_FUNCTION(svn_export) { 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)) { return; } ... 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 :)