You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/10/06 05:59:38 UTC
svn commit: r1394915 [2/7] - in /subversion/branches/inheritable-props: ./
build/ build/ac-macros/ subversion/bindings/swig/
subversion/bindings/swig/include/
subversion/bindings/swig/perl/libsvn_swig_perl/
subversion/bindings/swig/perl/native/ subvers...
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/3client.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/3client.t Sat Oct 6 03:59:33 2012
@@ -20,7 +20,7 @@
#
#
-use Test::More tests => 121;
+use Test::More tests => 211;
use strict;
# shut up about variables that are only used once.
@@ -28,9 +28,13 @@ use strict;
# by the bindings but not elsewhere in perl space.
no warnings 'once';
+# TEST
use_ok('SVN::Core');
+# TEST
use_ok('SVN::Repos');
+# TEST
use_ok('SVN::Client');
+# TEST
use_ok('SVN::Wc'); # needed for status
use File::Spec::Functions;
use File::Temp qw(tempdir);
@@ -67,113 +71,199 @@ if ($^O eq 'MSWin32') {
# This is ugly to create the test repo with SVN::Repos, but
# it seems to be the most reliable way.
+# TEST
ok(SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
my ($ctx) = SVN::Client->new;
+# TEST
isa_ok($ctx,'SVN::Client','Client Object');
my $uuid_from_url = $ctx->uuid_from_url($reposurl);
+# TEST
ok($uuid_from_url,'Valid return from uuid_from_url method form');
# test non method invocation passing a SVN::Client
+# TEST
ok(SVN::Client::uuid_from_url($reposurl,$ctx),
'Valid return from uuid_from_url function form with SVN::Client object');
# test non method invocation passing a _p_svn_client_ctx_t
+# TEST
ok(SVN::Client::uuid_from_url($reposurl,$ctx->{'ctx'}),
'Valid return from uuid_from_url function form with _p_svn_client_ctx object');
my ($ci_dir1) = $ctx->mkdir(["$reposurl/dir1"]);
+# TEST
isa_ok($ci_dir1,'_p_svn_client_commit_info_t');
$current_rev++;
+# TEST
is($ci_dir1->revision,$current_rev,"commit info revision equals $current_rev");
my ($rpgval,$rpgrev) = $ctx->revprop_get('svn:author',$reposurl,$current_rev);
+# TEST
is($rpgval,$username,'svn:author set to expected username from revprop_get');
+# TEST
is($rpgrev,$current_rev,'Returned revnum of current rev from revprop_get');
if ($^O eq 'MSWin32') {
+ # TEST
ok(open(NEW, ">$repospath/hooks/pre-revprop-change.bat"),
'Open pre-revprop-change hook for writing');
+ # TEST
ok(print(NEW 'exit 0'), 'Print to hook');
+ # TEST
ok(close(NEW), 'Close hook');
} else {
+ # TEST
ok(rename("$repospath/hooks/pre-revprop-change.tmpl",
"$repospath/hooks/pre-revprop-change"),
'Rename pre-revprop-change hook');
+ # TEST
ok(chmod(0700,"$repospath/hooks/pre-revprop-change"),
'Change permissions on pre-revprop-change hook');
+ # TEST
is(1, 1, '-')
}
my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
$reposurl, $current_rev, 0);
+# TEST
is($rps_rev,$current_rev,
'Returned revnum of current rev from revprop_set');
my ($rph, $rplrev) = $ctx->revprop_list($reposurl,$current_rev);
+# TEST
isa_ok($rph,'HASH','Returned hash reference form revprop_list');
+# TEST
is($rplrev,$current_rev,'Returned current rev from revprop_list');
+# TEST
is($rph->{'svn:author'},$username,
'svn:author is expected user from revprop_list');
+# TEST
is($rph->{'svn:log'},'mkdir dir1',
'svn:log is expected value from revprop_list');
+# TEST
ok($rph->{'svn:date'},'svn:date is set from revprop_list');
+# TEST
is($ctx->checkout($reposurl,$wcpath,'HEAD',1),$current_rev,
'Returned current rev from checkout');
+# TEST
+is($ctx->checkout2($reposurl,$wcpath . '2',undef,'HEAD',1,0),$current_rev,
+ 'Returned current rev from checkout2');
+
+# TEST
+is($ctx->checkout3($reposurl,$wcpath . '3',undef,'HEAD',$SVN::Depth::infinity,
+ 0,0),$current_rev, 'Returned current rev from checkout3');
+
+# TEST
is(SVN::Client::url_from_path($wcpath),$reposurl,
"Returned $reposurl from url_from_path");
+# TEST
ok(open(NEW, ">$wcpath/dir1/new"),'Open new file for writing');
+# TEST
ok(print(NEW 'addtest'), 'Print to new file');
+# TEST
ok(close(NEW),'Close new file');
# no return means success
+# TEST
is($ctx->add("$wcpath/dir1/new",0),undef,
'Returned undef from add schedule operation');
+# TEST
+ok(open(NEW2, ">$wcpath/dir1/new2"),'Open new2 file for writing');
+# TEST
+ok(print(NEW2 'addtest2'), 'Print to new2 file');
+# TEST
+ok(close(NEW2),'Close new2 file');
+
+# no return means success
+# TEST
+is($ctx->add2("$wcpath/dir1/new2",0,0),undef,
+ 'Returned undef from add2 schedule operation');
+
+# TEST
+ok(open(NEW3, ">$wcpath/dir1/new3"),'Open new3 file for writing');
+# TEST
+ok(print(NEW3 'addtest3'), 'Print to new3 file');
+# TEST
+ok(close(NEW3),'Close new3 file');
+
+# no return means success
+# TEST
+is($ctx->add3("$wcpath/dir1/new3",0,0,0),undef,
+ 'Returned undef from add3 schedule operation');
+
+# TEST
+ok(open(NEW4, ">$wcpath/dir1/new4"),'Open new4 file for writing');
+# TEST
+ok(print(NEW4 'addtest4'), 'Print to new4 file');
+# TEST
+ok(close(NEW4),'Close new4 file');
+
+# no return means success
+# TEST
+is($ctx->add4("$wcpath/dir1/new4",$SVN::Depth::empty,0,0,0),undef,
+ 'Returned undef from add4 schedule operation');
+
+
# test the log_msg callback
$ctx->log_msg(
sub
{
my ($log_msg,$tmp_file,$commit_items,$pool) = @_;
+ # TEST
isa_ok($log_msg,'SCALAR','log_msg param to callback is a SCALAR');
+ # TEST
isa_ok($tmp_file,'SCALAR','tmp_file param to callback is a SCALAR');
+ # TEST
isa_ok($commit_items,'ARRAY',
'commit_items param to callback is a SCALAR');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param to callback is a _p_apr_pool_t');
my $commit_item = shift @$commit_items;
+ # TEST
isa_ok($commit_item,'_p_svn_client_commit_item3_t',
'commit_item element is a _p_svn_client_commit_item3_t');
+ # TEST
is($commit_item->path(),"$wcpath/dir1/new",
"commit_item has proper path for committed file");
+ # TEST
is($commit_item->kind(),$SVN::Node::file,
"kind() shows the node as a file");
+ # TEST
is($commit_item->url(),"$reposurl/dir1/new",
'URL matches our repos url');
# revision is INVALID because the commit has not happened yet
# and this is not a copy
+ # TEST
is($commit_item->revision(),$SVN::Core::INVALID_REVNUM,
'Revision is INVALID since commit has not happened yet');
+ # TEST
is($commit_item->copyfrom_url(),undef,
'copyfrom_url is undef since file is not a copy');
+ # TEST
is($commit_item->state_flags(),$SVN::Client::COMMIT_ITEM_ADD |
$SVN::Client::COMMIT_ITEM_TEXT_MODS,
'state_flags are ADD and TEXT_MODS');
my $prop_changes = $commit_item->incoming_prop_changes();
+ # TEST
isa_ok($prop_changes, 'ARRAY',
'incoming_prop_changes returns an ARRAY');
+ # TEST
is(scalar(@$prop_changes), 0,
'No elements in the incoming_prop_changes array because ' .
' we did not make any');
$prop_changes = $commit_item->outgoing_prop_changes();
+ # TEST
is($prop_changes, undef,
'No outgoing_prop_changes array because we did not create one');
$$log_msg = 'Add new';
@@ -182,23 +272,30 @@ $ctx->log_msg(
my ($ci_commit1) = $ctx->commit($wcpath,0);
+# TEST
isa_ok($ci_commit1,'_p_svn_client_commit_info_t',
'Commit returns a _p_svn_client_commit_info');
$current_rev++;
+# TEST
is($ci_commit1->revision,$current_rev,
"commit info revision equals $current_rev");
# get rid of log_msg callback
+# TEST
is($ctx->log_msg(undef),undef,
'Clearing the log_msg callback works');
# test info() on WC
+# TEST
is($ctx->info("$wcpath/dir1/new", undef, 'WORKING',
sub
{
my($infopath,$svn_info_t,$pool) = @_;
+ # TEST
is($infopath,"new",'path passed to receiver is same as WC');
+ # TEST
isa_ok($svn_info_t,'_p_svn_info_t');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is _p_apr_pool_t');
}, 0),
@@ -206,75 +303,416 @@ is($ctx->info("$wcpath/dir1/new", undef,
'info should return undef');
my $svn_error = $ctx->info("$wcpath/dir1/newxyz", undef, 'WORKING', sub {}, 0);
+# TEST
isa_ok($svn_error, '_p_svn_error_t',
'info should return _p_svn_error_t for a nonexistent file');
$svn_error->clear(); #don't leak this
# test getting the log
+# TEST
is($ctx->log("$reposurl/dir1/new",$current_rev,$current_rev,1,0,
sub
{
my ($changed_paths,$revision,
$author,$date,$message,$pool) = @_;
+ # TEST
isa_ok($changed_paths,'HASH',
'changed_paths param is a HASH');
+ # TEST
isa_ok($changed_paths->{'/dir1/new'},
'_p_svn_log_changed_path_t',
'Hash value is a _p_svn_log_changed_path_t');
+ # TEST
is($changed_paths->{'/dir1/new'}->action(),'A',
'action returns A for add');
+ # TEST
is($changed_paths->{'/dir1/new'}->copyfrom_path(),undef,
'copyfrom_path returns undef as it is not a copy');
+ # TEST
is($changed_paths->{'/dir1/new'}->copyfrom_rev(),
$SVN::Core::INVALID_REVNUM,
'copyfrom_rev is set to INVALID as it is not a copy');
+ # TEST
is($revision,$current_rev,
'revision param matches current rev');
+ # TEST
is($author,$username,
'author param matches expected username');
+ # TEST
ok($date,'date param is defined');
+ # TEST
is($message,'Add new',
'message param is the expected value');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is _p_apr_pool_t');
}),
undef,
'log returns undef');
+# TEST
is($ctx->update($wcpath,'HEAD',1),$current_rev,
'Return from update is the current rev');
+my $update2_result = $ctx->update2([$wcpath],'HEAD',1,0);
+# TEST
+isa_ok($update2_result,'ARRAY','update2 returns a list');
+# TEST
+is(scalar(@$update2_result),1,'update2 member count');
+# TEST
+is($update2_result->[0],$current_rev,'return from update2 is the current rev');
+
+my $update3_result = $ctx->update3([$wcpath],'HEAD',$SVN::Depth::infinity,
+ 0,0,0);
+# TEST
+isa_ok($update3_result,'ARRAY','update3 returns a list');
+# TEST
+is(scalar(@$update3_result),1,'update3 member count');
+# TEST
+is($update3_result->[0],$current_rev,'return from update3 is the current rev');
+
+my $update4_result = $ctx->update4([$wcpath],'HEAD',$SVN::Depth::infinity,
+ 0,0,0,1,0);
+# TEST
+isa_ok($update4_result,'ARRAY','update4 returns a list');
+# TEST
+is(scalar(@$update4_result),1,'update4 member count');
+# TEST
+is($update4_result->[0],$current_rev,'return from update4 is the current rev');
+
# no return so we should get undef as the result
# we will get a _p_svn_error_t if there is an error.
+# TEST
is($ctx->propset('perl-test','test-val',"$wcpath/dir1",0),undef,
'propset on a working copy path returns undef');
my ($ph) = $ctx->propget('perl-test',"$wcpath/dir1",undef,0);
+# TEST
isa_ok($ph,'HASH','propget returns a hash');
+# TEST
is($ph->{"$wcpath/dir1"},'test-val','perl-test property has the correct value');
# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
is($ctx->status($wcpath, undef, sub {
my ($path,$wc_status) = @_;
+ # TEST
is($path,"$wcpath/dir1",
'path param to status callback is' .
- 'the correct path.');
+ ' the correct path.');
+ # TEST
isa_ok($wc_status,'_p_svn_wc_status_t',
'wc_stats param is a' .
' _p_svn_wc_status_t');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status' .
+ ' callback');
+ # TEST
is($wc_status->prop_status(),
- $SVN::Wc::status_modified,
- 'prop_status is status_modified');
- # TODO test the rest of the members
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status' .
+ ' callback');
},
1, 0, 0, 0),
$SVN::Core::INVALID_REVNUM,
'status returns INVALID_REVNUM when run against a working copy');
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status2($wcpath, undef, sub {
+ my ($path,$wc_status) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status2 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status2' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status2 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status2 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status2 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status2 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status2 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status2 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status2 callback');
+ },
+ 1, 0, 0, 0, 0),
+ $SVN::Core::INVALID_REVNUM,
+ 'status2 returns INVALID_REVNUM when run against a working copy');
+
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status3($wcpath, undef, sub {
+ my ($path,$wc_status) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status3 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status3' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status3 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status3 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status3 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status3 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status3 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status3 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status3 callback');
+ },
+ $SVN::Depth::infinity, 0, 0, 0, 0, undef),
+ $SVN::Core::INVALID_REVNUM,
+ 'status3 returns INVALID_REVNUM when run against a working copy');
+
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status4($wcpath, undef, sub {
+ my ($path,$wc_status, $pool) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status4 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status4' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status4 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status4 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status4 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status4 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status4 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status4 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status4 callback');
+ # TEST
+ isa_ok($pool, '_p_apr_pool_t',
+ 'pool param to status4' .
+ ' callback');
+ },
+ $SVN::Depth::infinity, 0, 0, 0, 0, undef),
+ $SVN::Core::INVALID_REVNUM,
+ 'status4 returns INVALID_REVNUM when run against a working copy');
+
+
my ($ci_commit2) = $ctx->commit($wcpath,0);
+# TEST
isa_ok($ci_commit2,'_p_svn_client_commit_info_t',
'commit returns a _p_svn_client_commit_info_t');
$current_rev++;
+# TEST
is($ci_commit2->revision(),$current_rev,
"commit info revision equals $current_rev");
@@ -282,74 +720,100 @@ my $dir1_rev = $current_rev;
my($pl) = $ctx->proplist($reposurl,$current_rev,1);
+# TEST
isa_ok($pl,'ARRAY','proplist returns an ARRAY');
+# TEST
isa_ok($pl->[0], '_p_svn_client_proplist_item_t',
'array element is a _p_svn_client_proplist_item_t');
+# TEST
is($pl->[0]->node_name(),"$reposurl/dir1",
'node_name is the expected value');
my $plh = $pl->[0]->prop_hash();
+# TEST
isa_ok($plh,'HASH',
'prop_hash returns a HASH');
+# TEST
is_deeply($plh, {'perl-test' => 'test-val'}, 'test prop list prop_hash values');
# add a dir to test update
my ($ci_dir2) = $ctx->mkdir(["$reposurl/dir2"]);
+# TEST
isa_ok($ci_dir2,'_p_svn_client_commit_info_t',
'mkdir returns a _p_svn_client_commit_info_t');
$current_rev++;
+# TEST
is($ci_dir2->revision(),$current_rev,
"commit info revision equals $current_rev");
# Use explicit revnum to test that instead of just HEAD.
+# TEST
is($ctx->update($wcpath,$current_rev,$current_rev),$current_rev,
'update returns current rev');
# commit action against a repo returns undef
+# TEST
is($ctx->delete(["$wcpath/dir2"],0),undef,
'delete returns undef');
# no return means success
+# TEST
is($ctx->revert($wcpath,1),undef,
'revert returns undef');
my ($ci_copy) = $ctx->copy("$reposurl/dir1",2,"$reposurl/dir3");
+# TEST
isa_ok($ci_copy,'_p_svn_client_commit_info_t',
'copy returns a _p_svn_client_commitn_info_t when run against repo');
$current_rev++;
+# TEST
is($ci_copy->revision,$current_rev,
"commit info revision equals $current_rev");
+# TEST
ok(mkdir($importpath),'Make import path dir');
+# TEST
ok(open(FOO, ">$importpath/foo"),'Open file for writing in import path dir');
+# TEST
ok(print(FOO 'foobar'),'Print to the file in import path dir');
+# TEST
ok(close(FOO),'Close file in import path dir');
my ($ci_import) = $ctx->import($importpath,$reposurl,0);
+# TEST
isa_ok($ci_import,'_p_svn_client_commit_info_t',
'Import returns _p_svn_client_commint_info_t');
$current_rev++;
+# TEST
is($ci_import->revision,$current_rev,
"commit info revision equals $current_rev");
+# TEST
is($ctx->blame("$reposurl/foo",'HEAD','HEAD', sub {
my ($line_no,$rev,$author,
$date, $line,$pool) = @_;
+ # TEST
is($line_no,0,
'line_no param is zero');
+ # TEST
is($rev,$current_rev,
'rev param is current rev');
+ # TEST
is($author,$username,
'author param is expected' .
'value');
+ # TEST
ok($date,'date is defined');
if ($^O eq 'MSWin32') {
#### Why two \r-s?
+ # TEST
is($line,"foobar\r\r",
'line is expected value');
} else {
+ # TEST
is($line,'foobar',
'line is expected value');
}
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is ' .
'_p_apr_pool_t');
@@ -357,42 +821,58 @@ is($ctx->blame("$reposurl/foo",'HEAD','H
undef,
'blame returns undef');
+# TEST
ok(open(CAT, "+>$testpath/cattest"),'open file for cat output');
+# TEST
is($ctx->cat(\*CAT, "$reposurl/foo", 'HEAD'),undef,
'cat returns undef');
+# TEST
ok(seek(CAT,0,0),
'seek the beginning of the cat file');
+# TEST
is(readline(*CAT),'foobar',
'read the first line of the cat file');
+# TEST
ok(close(CAT),'close cat file');
# the string around the $current_rev exists to expose a past
# bug. In the past we did not accept values that simply
# had not been converted to a number yet.
my ($dirents) = $ctx->ls($reposurl,"$current_rev", 1);
+# TEST
isa_ok($dirents, 'HASH','ls returns a HASH');
+# TEST
isa_ok($dirents->{'dir1'},'_p_svn_dirent_t',
'hash value is a _p_svn_dirent_t');
+# TEST
is($dirents->{'dir1'}->kind(),$SVN::Core::node_dir,
'kind() returns a dir node');
+# TEST
is($dirents->{'dir1'}->size(),0,
'size() returns 0 for a directory');
+# TEST
is($dirents->{'dir1'}->has_props(),1,
'has_props() returns true');
+# TEST
is($dirents->{'dir1'}->created_rev(),$dir1_rev,
'created_rev() returns expected rev');
+# TEST
ok($dirents->{'dir1'}->time(),
'time is defined');
#diag(scalar(localtime($dirents->{'dir1'}->time() / 1000000)));
+# TEST
is($dirents->{'dir1'}->last_author(),$username,
'last_auth() returns expected username');
# test removing a property
+# TEST
is($ctx->propset('perl-test', undef, "$wcpath/dir1", 0),undef,
'propset returns undef');
my ($ph2) = $ctx->propget('perl-test', "$wcpath/dir1", 'WORKING', 0);
+# TEST
isa_ok($ph2,'HASH','propget returns HASH');
+# TEST
is(scalar(keys %$ph2),0,
'No properties after deleting a property');
@@ -455,6 +935,7 @@ SKIP: {
my $oldauthbaton = $ctx->auth();
+ # TEST
isa_ok($ctx->auth(SVN::Client::get_simple_prompt_provider(
sub { simple_prompt(@_,'x') },2),
SVN::Client::get_ssl_server_trust_prompt_provider(
@@ -469,9 +950,11 @@ SKIP: {
# if this doesn't work we will get an svn_error_t so by
# getting a hash we know it worked.
my ($dirents) = $ctx->ls('https://localhost/svn/test','HEAD',1);
+ # TEST
isa_ok($dirents,'HASH','ls returns a HASH');
# return the auth baton to its original setting
+ # TEST
isa_ok($ctx->auth($oldauthbaton),'_p_svn_auth_baton_t',
'Successfully set auth_baton back to old value');
}
@@ -487,6 +970,7 @@ my @providers = @{SVN::Core::auth_get_pl
foreach my $p (@providers) {
$ok &= defined($p) && $p->isa('_p_svn_auth_provider_object_t');
}
+# TEST
ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s');
SKIP: {
@@ -508,6 +992,7 @@ SKIP: {
my $callback = \&gnome_keyring_unlock_prompt;
my $result = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
$ctx->auth(), $callback);
+ # TEST
is(${$result}, $callback, 'auth_set_gnome_keyring_unlock_prompt_func result equals paramter');
}
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/4pool.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/4pool.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/4pool.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/4pool.t Sat Oct 6 03:59:33 2012
@@ -55,6 +55,7 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
@@ -62,19 +63,23 @@ my $fs = $repos->fs;
my $pool = SVN::Pool->new_default;
+# TEST
is_pool_default($pool, 'default pool');
{
my $spool = SVN::Pool->new_default_sub;
+ # TEST
is_pool_default($spool, 'lexical default pool default');
}
+# TEST
is_pool_default($pool, 'lexical default pool destroyed');
my $root = $fs->revision_root(0);
my $txn = $fs->begin_txn(0);
+# TEST
$txn->root->make_dir('trunk');
$txn->commit;
@@ -86,6 +91,7 @@ SVN::Repos::dir_delta($root, '', '',
undef, 1, 1, 0, 1);
+# TEST
is_pool_default($pool, 'default pool from c calls destroyed');
END {
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta-compat.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta-compat.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta-compat.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta-compat.t Sat Oct 6 03:59:33 2012
@@ -33,11 +33,13 @@ open my $aresult, '>', \$result;
my $txstream = SVN::TxDelta::new($source, $target);
+# TEST
isa_ok($txstream, '_p_svn_txdelta_stream_t');
open my $asource, '<', \$srctext;
my $handle = [SVN::TxDelta::apply($asource, $aresult, undef, undef)];
SVN::TxDelta::send_txstream($txstream, @$handle);
+# TEST
is($result, $tgttext, 'delta self test');
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/5delta.t Sat Oct 6 03:59:33 2012
@@ -33,12 +33,15 @@ open my $aresult, '>', \$result;
my $txstream = SVN::TxDelta::new($source, $target);
+# TEST
isa_ok($txstream, '_p_svn_txdelta_stream_t');
open my $asource, '<', \$srctext;
my ($md5, @handle) = SVN::TxDelta::apply($asource, $aresult, undef);
SVN::TxDelta::send_txstream($txstream, @handle);
+# TEST
is($result, $tgttext, 'delta self test');
+# TEST
is("$md5", 'a22b3dadcbddac48d2f1eae3ec5fb86a', 'md5 matched');
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/6ra.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/6ra.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/6ra.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/6ra.t Sat Oct 6 03:59:33 2012
@@ -36,6 +36,7 @@ my $BINARY_DATA = "foo\0\n\t\x1F\x7F\x80
my $repospath = tempdir('svn-perl-test-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
@@ -61,25 +62,36 @@ $uri = "file://$uri";
{
my $ra = SVN::Ra->new($uri);
+ # TEST
isa_ok($ra, 'SVN::Ra', 'create with only one argument');
}
my $ra = SVN::Ra->new(url => $uri);
+# TEST
isa_ok($ra, 'SVN::Ra', 'create with hash param');
+# TEST
is($ra->get_uuid, $fs->get_uuid, 'get_uuid');
+# TEST
is($ra->get_latest_revnum, 2, 'get_latest_revnum');
+# TEST
is($ra->get_repos_root, $uri, 'get_repos_root');
# get_dir
{
my ($dirents, $revnum, $props) = $ra->get_dir('trunk',
$SVN::Core::INVALID_REVNUM);
+ # TEST
isa_ok($dirents, 'HASH', 'get_dir: dirents');
+ # TEST
is(scalar(keys %$dirents), 2, 'get_dir: num dirents');
+ # TEST+2
isa_ok($dirents->{$_}, '_p_svn_dirent_t', "get_dir: dirent $_")
for qw( filea fileb );
+ # TEST
is($revnum, $ra->get_latest_revnum, 'get_dir: revnum');
+ # TEST
isa_ok($props, 'HASH', 'get_dir: props');
+ # TEST
is($props->{'dir-prop'}, 'frob', 'get_dir: property dir-prop');
}
@@ -87,15 +99,22 @@ is($ra->get_repos_root, $uri, 'get_repos
{
my ($revnum, $props) = $ra->get_file('trunk/filea',
$SVN::Core::INVALID_REVNUM, undef);
+ # TEST
is($revnum, $ra->get_latest_revnum, 'get_file: revnum');
+ # TEST
isa_ok($props, 'HASH', 'get_file: props');
+ # TEST
ok(!exists $props->{'test-prop'}, 'get_file: property test-prop deleted');
+ # TEST
is($props->{'binary-prop'}, $BINARY_DATA, 'get_file: property binary-prop');
}
# Revision properties
+# TEST
isa_ok($ra->rev_proplist(1), 'HASH', 'rev_proplist: object');
+# TEST
is($ra->rev_prop(1, 'nonexistent'), undef, 'rev_prop: nonexistent');
+# TEST
like($ra->rev_prop(1, 'svn:date'), qr/^\d+-\d+-\d+T\d+:\d+:\d+\.\d+Z$/,
'rev_prop: svn:date');
@@ -115,51 +134,71 @@ SKIP: {
or die "error making hook script '$script_filename' executable: $!";
$ra->change_rev_prop(1, 'test-prop', 'foo');
+ # TEST
is($ra->rev_prop(1, 'test-prop'), 'foo', 'change_rev_prop');
$ra->change_rev_prop(1, 'test-prop', undef);
+ # TEST
is($ra->rev_prop(1, 'test-prop'), undef, 'change_rev_prop: deleted');
$ra->change_rev_prop(1, 'binary-prop', $BINARY_DATA);
+ # TEST
is($ra->rev_prop(1, 'binary-prop'), $BINARY_DATA,
'change_rev_prop with binary data');
}
# Information about nodes in the filesystem.
+# TEST
is($ra->check_path('trunk', 1), $SVN::Node::dir, 'check_path');
{
my $dirent = $ra->stat('trunk', 1);
+ # TEST
isa_ok($dirent, '_p_svn_dirent_t', 'stat dir: dirent object');
+ # TEST
is($dirent->kind, $SVN::Node::dir, 'stat dir: kind');
+ # TEST
is($dirent->size, 0, 'stat dir: size');
+ # TEST
is($dirent->created_rev, 1, 'stat dir: created_rev');
+ # TEST
ok($dirent->has_props, 'stat dir: has_props');
$dirent = $ra->stat('trunk/fileb', 1);
+ # TEST
is($dirent->kind, $SVN::Node::file, 'stat file: kind');
+ # TEST
ok(!$dirent->has_props, 'stat file: has_props');
}
# do_update
my $ed = MockEditor->new;
my $reporter = $ra->do_update(2, '', 1, $ed);
+# TEST
isa_ok($reporter, 'SVN::Ra::Reporter');
$reporter->set_path('', 0, 1, undef);
$reporter->finish_report;
+# TEST
is($ed->{_base_revnum}, 0, 'do_update: base_revision');
+# TEST
is($ed->{_target_revnum}, 2, 'do_update: target_revnum');
+# TEST
is($ed->{trunk}{props}{'dir-prop'}, 'frob', 'do_update: dir-prop');
+# TEST
ok(!exists $ed->{'trunk/filea'}{props}{'test-prop'},
'do_update: deleted property');
+# TEST
is($ed->{'trunk/filea'}{props}{'binary-prop'}, $BINARY_DATA,
'do_update: binary-prop');
# replay
$ed = MockEditor->new;
$ra->replay(1, 0, 1, $ed);
+# TEST
is($ed->{trunk}{type}, 'dir', "replay: got trunk");
+# TEST
is($ed->{trunk}{props}{'dir-prop'}, 'frob', 'replay: dir-prop');
+# TEST
is($ed->{'trunk/filea'}{props}{'binary-prop'}, $BINARY_DATA,
'replay: binary-prop');
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/7editor.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/7editor.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/7editor.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/7editor.t Sat Oct 6 03:59:33 2012
@@ -62,6 +62,7 @@ SVN::Repos::dir_delta($fs->revision_root
MyEditor->new(crap => bless {}, 'something'),
undef, 1, 1, 0, 0);
};
+# TEST
ok($main::something_destroyed, 'editor');
package something;
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/8lock.t
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/8lock.t?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/8lock.t (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/perl/native/t/8lock.t Sat Oct 6 03:59:33 2012
@@ -37,12 +37,14 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
my $fs = $repos->fs;
my $acc = SVN::Fs::create_access('foo');
+# TEST
is($acc->get_username, 'foo');
$fs->set_access($acc);
@@ -58,11 +60,15 @@ my $token = "opaquelocktoken:notauuid-$$
$fs->lock('/testfile', $token, 'we hate software', 0, 0, $fs->youngest_rev, 0);
+# TEST
ok(my $lock = $fs->get_lock('/testfile'));
+# TEST
is($lock->token, $token);
+# TEST
is($lock->owner, 'foo');
$acc = SVN::Fs::create_access('fnord');
+# TEST
is($acc->get_username, 'fnord');
$fs->set_access($acc);
@@ -70,11 +76,13 @@ eval {
$fs->lock('/testfile', $token, 'we hate software', 0, 0, $fs->youngest_rev, 0);
};
+# TEST
like($@, qr/already locked/);
eval {
$fs->unlock('/testfile', 'software', 0)
};
+# TEST
like($@, qr/no such lock/);
$fs->unlock('/testfile', 'software', 1);
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sat Oct 6 03:59:33 2012
@@ -4191,3 +4191,97 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
callbacks->dir_props_changed = wc_diff_callbacks2_dir_props_changed;
return callbacks;
}
+
+svn_boolean_t
+svn_swig_py_config_enumerator2(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool)
+{
+ PyObject *function = baton;
+ PyObject *result;
+ svn_error_t *err = SVN_NO_ERROR;
+ svn_boolean_t c_result;
+
+ svn_swig_py_acquire_py_lock();
+
+ if ((result = PyObject_CallFunction(function,
+ (char *)"ssO&",
+ name,
+ value,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ /* If it's not a SubversionException, we still have to clear it, because
+ otherwise the SWIG wrapper will not check for it, and return a value with an
+ exception pending. */
+ PyErr_Clear();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ if (err)
+ {
+ /* We can't return the error, but let's at least stop enumeration. */
+ svn_error_clear(err);
+ c_result = FALSE;
+ }
+ else
+ {
+ c_result = result == Py_True;
+ Py_DECREF(result);
+ }
+
+ svn_swig_py_release_py_lock();
+
+ return c_result;
+}
+
+svn_boolean_t
+svn_swig_py_config_section_enumerator2(const char *name,
+ void *baton,
+ apr_pool_t *pool)
+{
+ PyObject *function = baton;
+ PyObject *result;
+ svn_error_t *err = SVN_NO_ERROR;
+ svn_boolean_t c_result;
+
+ svn_swig_py_acquire_py_lock();
+
+ if ((result = PyObject_CallFunction(function,
+ (char *)"sO&",
+ name,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ /* If it's not a SubversionException, we still have to clear it, because
+ otherwise the SWIG wrapper will not check for it, and return a value with an
+ exception pending. */
+ PyErr_Clear();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ if (err)
+ {
+ /* We can't return the error, but let's at least stop enumeration. */
+ svn_error_clear(err);
+ c_result = FALSE;
+ }
+ else
+ {
+ c_result = result == Py_True;
+ Py_DECREF(result);
+ }
+
+ svn_swig_py_release_py_lock();
+
+ return c_result;
+}
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Sat Oct 6 03:59:33 2012
@@ -529,6 +529,19 @@ svn_error_t *svn_swig_py_ra_lock_callbac
SVN_SWIG_SWIGUTIL_EXPORT
extern const svn_ra_reporter2_t swig_py_ra_reporter2;
+SVN_SWIG_SWIGUTIL_EXPORT
+svn_boolean_t
+svn_swig_py_config_enumerator2(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool);
+
+SVN_SWIG_SWIGUTIL_EXPORT
+svn_boolean_t
+svn_swig_py_config_section_enumerator2(const char *name,
+ void *baton,
+ apr_pool_t *pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/core.py?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/core.py (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/core.py Sat Oct 6 03:59:33 2012
@@ -97,7 +97,7 @@ class SubversionCoreTestCase(unittest.Te
# will be passed through.
rec.e = svn.core.SubversionException("No fields except message.")
# e.apr_err is None but should be an int
- self.assertRaises(TypeError, svn.client.info2, args)
+ self.assertRaises(TypeError, svn.client.info2, *args)
finally:
# This would happen without the finally block as well, but we expliticly
# order the operations so that the cleanup is not hindered by any open
@@ -105,6 +105,71 @@ class SubversionCoreTestCase(unittest.Te
del ctx
t.cleanup()
+ def test_config_enumerate2(self):
+ cfg = svn.core.svn_config_create(False)
+ entries = {
+ 'one': 'one-value',
+ 'two': 'two-value',
+ 'three': 'three-value'
+ }
+
+ for (name, value) in entries.iteritems():
+ svn.core.svn_config_set(cfg, "section", name, value)
+
+ received_entries = {}
+ def enumerator(name, value, pool):
+ received_entries[name] = value
+ return len(received_entries) < 2
+
+ svn.core.svn_config_enumerate2(cfg, "section", enumerator)
+
+ self.assertEqual(len(received_entries), 2)
+ for (name, value) in received_entries.iteritems():
+ self.assert_(name in entries)
+ self.assertEqual(value, entries[name])
+
+ def test_config_enumerate2_exception(self):
+ cfg = svn.core.svn_config_create(False)
+ svn.core.svn_config_set(cfg, "section", "one", "one-value")
+ svn.core.svn_config_set(cfg, "section", "two", "two-value")
+
+ def enumerator(name, value, pool):
+ raise Exception
+
+ # the exception will be swallowed, but enumeration must be stopped
+ self.assertEqual(
+ svn.core.svn_config_enumerate2(cfg, "section", enumerator), 1)
+
+ def test_config_enumerate_sections2(self):
+ cfg = svn.core.svn_config_create(False)
+ sections = ['section-one', 'section-two', 'section-three']
+
+ for section in sections:
+ svn.core.svn_config_set(cfg, section, "name", "value")
+
+ received_sections = []
+ def enumerator(section, pool):
+ received_sections.append(section)
+ return len(received_sections) < 2
+
+ svn.core.svn_config_enumerate_sections2(cfg, enumerator)
+
+ self.assertEqual(len(received_sections), 2)
+ for section in received_sections:
+ self.assert_(section in sections)
+
+ def test_config_enumerate_sections2_exception(self):
+ cfg = svn.core.svn_config_create(False)
+ svn.core.svn_config_set(cfg, "section-one", "name", "value")
+ svn.core.svn_config_set(cfg, "section-two", "name", "value")
+
+ def enumerator(section, pool):
+ raise Exception
+
+ # the exception will be swallowed, but enumeration must be stopped
+ self.assertEqual(
+ svn.core.svn_config_enumerate_sections2(cfg, enumerator), 1)
+
def suite():
return unittest.defaultTestLoader.loadTestsFromTestCase(
SubversionCoreTestCase)
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/pool.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/pool.py?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/pool.py (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/python/tests/pool.py Sat Oct 6 03:59:33 2012
@@ -56,17 +56,7 @@ class PoolTestCase(unittest.TestCase):
def test_object_hash_struct_members(self):
"""Check that struct members which are hashes of objects work correctly"""
- # Get an empty config
- (cfg_fd, cfg_name) = tempfile.mkstemp(prefix="conf-")
- os.close(cfg_fd)
-
- try:
- cfg = svn.core.svn_config_read(
- svn.core.svn_dirent_internal_style(cfg_name),
- False)
- finally:
- os.remove(cfg_name)
-
+ cfg = svn.core.svn_config_create(False)
client_ctx = svn.client.svn_client_create_context()
category = svn.core.SVN_CONFIG_CATEGORY_SERVERS
client_ctx.config = { category: cfg }
Modified: subversion/branches/inheritable-props/subversion/bindings/swig/svn_wc.i
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/bindings/swig/svn_wc.i?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/bindings/swig/svn_wc.i (original)
+++ subversion/branches/inheritable-props/subversion/bindings/swig/svn_wc.i Sat Oct 6 03:59:33 2012
@@ -155,11 +155,16 @@
)
#endif
-#ifndef SWIGPERL
%callback_typemap(svn_wc_status_func2_t status_func, void *status_baton,
svn_swig_py_status_func2,
- ,
+ svn_swig_pl_status_func2,
svn_swig_rb_wc_status_func)
+
+#ifdef SWIGPERL
+%callback_typemap(svn_wc_status_func3_t status_func, void *status_baton,
+ ,
+ svn_swig_pl_status_func3,
+ )
#endif
#ifndef SWIGPERL
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_cache.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_cache.h Sat Oct 6 03:59:33 2012
@@ -269,16 +269,33 @@ svn_cache__make_memcache_from_config(svn
* will generally result in higher hit rates and reduced conflict
* resolution overhead.
*
- * If access to the resulting cache object is guranteed to be serialized,
+ * The cache will be split into @a segment_count segments of equal size.
+ * A higher number reduces lock contention but also limits the maximum
+ * cachable item size. If it is not a power of two, it will be rounded
+ * down to next lower power of two. Also, there is an implementation
+ * specific upper limit and the setting will be capped there automatically.
+ * If the number is 0, a default will be derived from @a total_size.
+ *
+ * If access to the resulting cache object is guaranteed to be serialized,
* @a thread_safe may be set to @c FALSE for maximum performance.
*
+ * There is no limit on the number of threads reading a given cache segment
+ * concurrently. Writes, however, need an exclusive lock on the respective
+ * segment. @a allow_blocking_writes controls contention is handled here.
+ * If set to TRUE, writes will wait until the lock becomes available, i.e.
+ * reads should be short. If set to FALSE, write attempts will be ignored
+ * (no data being written to the cache) if some reader or another writer
+ * currently holds the segment lock.
+ *
* Allocations will be made in @a result_pool, in particular the data buffers.
*/
svn_error_t *
svn_cache__membuffer_cache_create(svn_membuffer_t **cache,
apr_size_t total_size,
apr_size_t directory_size,
+ apr_size_t segment_count,
svn_boolean_t thread_safe,
+ svn_boolean_t allow_blocking_writes,
apr_pool_t *result_pool);
/**
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h Sat Oct 6 03:59:33 2012
@@ -38,6 +38,21 @@ extern "C" {
#endif /* __cplusplus */
+/* Return true if KIND is a revision kind that is dependent on the working
+ * copy. Otherwise, return false. */
+#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
+ ((kind) == svn_opt_revision_base || \
+ (kind) == svn_opt_revision_previous || \
+ (kind) == svn_opt_revision_working || \
+ (kind) == svn_opt_revision_committed) \
+
+/* Return true if KIND is a revision kind that the WC can supply without
+ * contacting the repository. Otherwise, return false. */
+#define SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(kind) \
+ ((kind) == svn_opt_revision_base || \
+ (kind) == svn_opt_revision_working || \
+ (kind) == svn_opt_revision_committed)
+
/* A location in a repository. */
typedef struct svn_client__pathrev_t
{
@@ -98,6 +113,39 @@ const char *
svn_client__pathrev_fspath(const svn_client__pathrev_t *pathrev,
apr_pool_t *result_pool);
+/* Given PATH_OR_URL, which contains either a working copy path or an
+ absolute URL, a peg revision PEG_REVISION, and a desired revision
+ REVISION, create an RA connection to that object as it exists in
+ that revision, following copy history if necessary. If REVISION is
+ younger than PEG_REVISION, then PATH_OR_URL will be checked to see
+ that it is the same node in both PEG_REVISION and REVISION. If it
+ is not, then @c SVN_ERR_CLIENT_UNRELATED_RESOURCES is returned.
+
+ BASE_DIR_ABSPATH is the working copy path the ra_session corresponds to,
+ and should only be used if PATH_OR_URL is a url
+ ### else NULL? what's it for?
+
+ If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
+ for a URL or 'working' for a WC path. If REVISION->kind is
+ 'unspecified', the operative revision is the peg revision.
+
+ Store the resulting ra_session in *RA_SESSION_P. Store the final
+ resolved location of the object in *RESOLVED_LOC_P. RESOLVED_LOC_P
+ may be NULL if not wanted.
+
+ Use authentication baton cached in CTX to authenticate against the
+ repository.
+
+ Use POOL for all allocations. */
+svn_error_t *
+svn_client__ra_session_from_path2(svn_ra_session_t **ra_session_p,
+ svn_client__pathrev_t **resolved_loc_p,
+ const char *path_or_url,
+ const char *base_dir_abspath,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
/** Return @c SVN_ERR_ILLEGAL_TARGET if TARGETS contains a mixture of
* URLs and paths; otherwise return SVN_NO_ERROR.
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_dep_compat.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_dep_compat.h Sat Oct 6 03:59:33 2012
@@ -87,6 +87,21 @@ typedef apr_uint32_t apr_uintptr_t;
#endif /* !APR_VERSION_AT_LEAST(1,3,0) */
/**
+ * Work around a platform dependency issue. apr_thread_rwlock_trywrlock()
+ * will make APR_STATUS_IS_EBUSY() return TRUE if the lock could not be
+ * acquired under Unix. Under Windows, this will not work. So, provide
+ * a more portable substitute.
+ *
+ * @since New in 1.8.
+ */
+#ifdef WIN32
+#define SVN_LOCK_IS_BUSY(x) \
+ (APR_STATUS_IS_EBUSY(x) || (x) == APR_FROM_OS_ERROR(WAIT_TIMEOUT))
+#else
+#define SVN_LOCK_IS_BUSY(x) APR_STATUS_IS_EBUSY(x)
+#endif
+
+/**
* Check at compile time if the Serf version is at least a certain
* level.
* @param major The major version component of the version checked
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_fs_util.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_fs_util.h Sat Oct 6 03:59:33 2012
@@ -52,6 +52,12 @@ extern "C" {
const char *
svn_fs__canonicalize_abspath(const char *path, apr_pool_t *pool);
+/* Return FALSE, if a svn_fs__canonicalize_abspath will return a
+ different value than PATH (despite creating a copy).
+*/
+svn_boolean_t
+svn_fs__is_canonical_abspath(const char *path);
+
/* If EXPECT_OPEN, verify that FS refers to an open database;
otherwise, verify that FS refers to an unopened database. Return
an appropriate error if the expectation fails to match the
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h Sat Oct 6 03:59:33 2012
@@ -78,6 +78,18 @@ svn__ui64toa(char * dest, apr_uint64_t n
apr_size_t
svn__i64toa(char * dest, apr_int64_t number);
+/** Returns a decimal string for @a number allocated in @a pool. Put in
+ * the @a seperator at each third place.
+ */
+char *
+svn__ui64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool);
+
+/** Returns a decimal string for @a number allocated in @a pool. Put in
+ * the @a seperator at each third place.
+ */
+char *
+svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool);
+
/** @} */
/** @} */
Modified: subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h Sat Oct 6 03:59:33 2012
@@ -1745,6 +1745,52 @@ svn_wc__resolve_conflicts(svn_wc_context
void *notify_baton,
apr_pool_t *scratch_pool);
+/**
+ * Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath
+ * for addition to the repository, remembering the history. Mark @a src_abspath
+ * as deleted after moving.@a wc_ctx is used for accessing the working copy and
+ * must contain a write lock for the parent directory of @a src_abspath and
+ * @a dst_abspath.
+ *
+ * If @a metadata_only is TRUE then this is a database-only operation and
+ * the working directories and files are not changed.
+ *
+ * @a src_abspath must be a file or directory under version control;
+ * the parent of @a dst_abspath must be a directory under version control
+ * in the same working copy; @a dst_abspath will be the name of the copied
+ * item, and it must not exist already if @a metadata_only is FALSE. Note that
+ * when @a src points to a versioned file, the working file doesn't
+ * necessarily exist in which case its text-base is used instead.
+ *
+ * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
+ * will be raised if the move source is a mixed-revision subtree.
+ * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
+ * allowed. This parameter should be set to FALSE except where backwards
+ * compatibility to svn_wc_move() is required.
+ *
+ * If @a cancel_func is non-NULL, call it with @a cancel_baton at
+ * various points during the operation. If it returns an error
+ * (typically #SVN_ERR_CANCELLED), return that error immediately.
+ *
+ * If @a notify_func is non-NULL, call it with @a notify_baton and the path
+ * of the root node (only) of the destination.
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__move2(svn_wc_context_t *wc_ctx,
+ const char *src_abspath,
+ const char *dst_abspath,
+ svn_boolean_t metadata_only,
+ svn_boolean_t allow_mixed_revisions,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/inheritable-props/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_client.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_client.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_client.h Sat Oct 6 03:59:33 2012
@@ -1485,16 +1485,15 @@ svn_client_switch(svn_revnum_t *result_r
* @a path and everything under it fully recursively.
*
* @a path's parent must be under revision control already (unless
- * @a add_parents is TRUE), but @a path is not. If @a recursive is
- * set, then assuming @a path is a directory, all of its contents will
- * be scheduled for addition as well.
+ * @a add_parents is TRUE), but @a path is not.
*
* If @a force is not set and @a path is already under version
* control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is
* set, do not error on already-versioned items. When used on a
- * directory in conjunction with the @a recursive flag, this has the
- * effect of scheduling for addition unversioned files and directories
- * scattered deep within a versioned tree.
+ * directory in conjunction with a @a depth value greater than
+ * #svn_depth_empty, this has the effect of scheduling for addition
+ * any unversioned files and directories scattered within even a
+ * versioned tree (up to @a depth).
*
* If @a ctx->notify_func2 is non-NULL, then for each added item, call
* @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
@@ -2373,11 +2372,6 @@ svn_client_status_dup(const svn_client_s
*
* @a scratch_pool will be cleared between invocations to the callback.
*
- * ### we might be revamping the status infrastructure, and this callback
- * ### could totally disappear by the end of 1.7 development. however, we
- * ### need to mark the STATUS parameter as "const" so that it is easier
- * ### to reason about who/what can modify those structures.
- *
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_client_status_func_t)(
@@ -4307,6 +4301,12 @@ svn_client_copy(svn_client_commit_info_t
* If @a make_parents is TRUE, create any non-existent parent directories
* also. Otherwise, the parent of @a dst_path must already exist.
*
+ * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
+ * will be raised if the move source is a mixed-revision subtree.
+ * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
+ * allowed. This parameter should be set to FALSE except where backwards
+ * compatibility to svn_client_move6() is required.
+ *
* If non-NULL, @a revprop_table is a hash table holding additional,
* custom revision properties (<tt>const char *</tt> names mapped to
* <tt>svn_string_t *</tt> values) to be set on the new revision in
@@ -4327,7 +4327,26 @@ svn_client_copy(svn_client_commit_info_t
* @a commit_callback with @a commit_baton and a #svn_commit_info_t for
* the commit.
*
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_client_move7(const apr_array_header_t *src_paths,
+ const char *dst_path,
+ svn_boolean_t move_as_child,
+ svn_boolean_t make_parents,
+ svn_boolean_t allow_mixed_revisions,
+ const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_move7(), but with allow_mixed_revisions always
+ * set to @c TRUE.
+ *
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
svn_error_t *
svn_client_move6(const apr_array_header_t *src_paths,
Modified: subversion/branches/inheritable-props/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_dav.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_dav.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_dav.h Sat Oct 6 03:59:33 2012
@@ -53,6 +53,15 @@ extern "C" {
/** This header is *TEMPORARILY* used to transmit the delta base to the
* server. It contains a version resource URL for what is on the client.
+ *
+ * @note The HTTP delta draft recommends an If-None-Match header
+ * holding an entity tag corresponding to the base copy that the
+ * client has. In Subversion, it is much more natural to use a version
+ * URL to specify that base. We'd like, then, to use the If: header
+ * to specify the URL. Unfortunately, mod_dav sees all "State-token"
+ * items as lock tokens. So we'll use this custom header until mod_dav
+ * and other backend APIs are taught to be less rigid, at which time
+ * we can switch to using an If: header to report our base version.
*/
#define SVN_DAV_DELTA_BASE_HEADER "X-SVN-VR-Base"
@@ -296,6 +305,13 @@ extern "C" {
#define SVN_DAV_NS_DAV_SVN_INHERITED_PROPS \
SVN_DAV_PROP_NS_DAV "svn/inherited-props"
+/** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to
+ * properly handle ephemeral (that is, deleted-just-before-commit) FS
+ * transaction properties. */
+#define SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS\
+ SVN_DAV_PROP_NS_DAV "svn/ephemeral-txnprops"
+
/** @} */
/** @} */
Modified: subversion/branches/inheritable-props/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_delta.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_delta.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_delta.h Sat Oct 6 03:59:33 2012
@@ -452,6 +452,20 @@ svn_txdelta_send_txstream(svn_txdelta_st
apr_pool_t *pool);
+/** Send the @a contents of length @a len as a txdelta against an empty
+ * source directly to window-handler @a handler/@a handler_baton.
+ *
+ * All temporary allocation is performed in @a pool.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_txdelta_send_contents(const unsigned char *contents,
+ apr_size_t len,
+ svn_txdelta_window_handler_t handler,
+ void *handler_baton,
+ apr_pool_t *pool);
+
/** Prepare to apply a text delta. @a source is a readable generic stream
* yielding the source data, @a target is a writable generic stream to
* write target data to, and allocation takes place in a sub-pool of
@@ -483,6 +497,7 @@ svn_txdelta_apply(svn_stream_t *source,
+
/*** Producing and consuming svndiff-format text deltas. ***/
/** Prepare to produce an svndiff-format diff from text delta windows.
Modified: subversion/branches/inheritable-props/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_error_codes.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_error_codes.h Sat Oct 6 03:59:33 2012
@@ -540,6 +540,11 @@ SVN_ERROR_START
SVN_ERR_WC_CATEGORY_START + 39,
"Couldn't open a working copy file because access was denied")
+ /** @since New in 1.8. */
+ SVN_ERRDEF(SVN_ERR_WC_MIXED_REVISIONS,
+ SVN_ERR_WC_CATEGORY_START + 40,
+ "Mixed-revision working copy was found but not expected")
+
/* fs errors */
SVN_ERRDEF(SVN_ERR_FS_GENERAL,
Modified: subversion/branches/inheritable-props/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_fs.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_fs.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_fs.h Sat Oct 6 03:59:33 2012
@@ -1975,6 +1975,44 @@ svn_fs_file_contents(svn_stream_t **cont
const char *path,
apr_pool_t *pool);
+/**
+ * Callback function type that gets presented with a immutable non-NULL
+ * @a contents of @a len bytes. Further parameters may be passed through
+ * in @a baton.
+ *
+ * Allocations must be made in @a pool.
+ *
+ * @since New in 1.8.
+ */
+typedef svn_error_t *
+(*svn_fs_process_contents_func_t)(const unsigned char *contents,
+ apr_size_t len,
+ void *baton,
+ apr_pool_t *pool);
+
+/** Attempts to efficiently provide the contents of the file @a path in
+ * @a root. If that succeeds, @a *success will be set to #TRUE and the
+ * contents will be passed to the the @a processor along with the given
+ * @a baton. Allocations take place in @a pool.
+ *
+ * This function is intended to support zero copy data processing. It may
+ * not be implemented for all data backends or not applicable for certain
+ * content. In that case, @a *success will always be #FALSE. Also, this
+ * is a best-effort function which means there is no guarantee that e.g.
+ * @a processor gets called at for any content.
+ *
+ * @note @a processor is expected to be relatively short function with
+ * at most O(content size) runtime.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_fs_try_process_file_contents(svn_boolean_t *success,
+ svn_fs_root_t *root,
+ const char *path,
+ svn_fs_process_contents_func_t processor,
+ void* baton,
+ apr_pool_t *pool);
/** Create a new file named @a path in @a root. The file's initial contents
* are the empty string, and it has no properties. @a root must be the
Modified: subversion/branches/inheritable-props/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_props.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_props.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_props.h Sat Oct 6 03:59:33 2012
@@ -557,6 +557,33 @@ svn_prop_name_is_valid(const char *prop_
/** @} */
+/**
+ * These are reserved properties attached to a "transaction" object in
+ * the repository filesystem in advance of the pre-commit hook script
+ * running on the server, but then automatically removed from the
+ * transaction before its promotion to a new revision.
+ *
+ * @defgroup svn_props_ephemeral_txnprops Ephemeral transaction properties
+ * @{
+ */
+
+/** The prefix used for all (ephemeral) transaction properties. */
+#define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn:"
+
+/** Identifies the client version compability level. For clients
+ * compiled against Subversion libraries, this is @c SVN_VER_NUMBER.
+ * Third-party implementations are advised to use similar formatting
+ * for values of this property.
+ */
+#define SVN_PROP_TXN_CLIENT_COMPAT_VERSION \
+ SVN_PROP_TXN_PREFIX "client-compat-version"
+
+/** Identifies the client's user agent string, if any. */
+#define SVN_PROP_TXN_USER_AGENT \
+ SVN_PROP_TXN_PREFIX "user-agent"
+
+/** @} */
+
/** @} */
Modified: subversion/branches/inheritable-props/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_ra.h?rev=1394915&r1=1394914&r2=1394915&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_ra.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_ra.h Sat Oct 6 03:59:33 2012
@@ -2085,6 +2085,14 @@ svn_ra_has_capability(svn_ra_session_t *
*/
#define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props"
+/**
+ * The capability of a server to automatically remove transaction
+ * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX.
+ *
+ * @since New in 1.8.
+ */
+#define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
+
/* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
*
* RA layers generally fetch all capabilities when asked about any