You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/10/21 04:00:47 UTC
svn commit: r1400556 [5/29] - in /subversion/branches/ev2-export: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/
contrib/client-side/emacs/ contrib/client-side/svn-push/
contrib/client-side/svnmerge/ contrib/hook-s...
Modified: subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/3client.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/3client.t Sun Oct 21 02:00:31 2012
@@ -20,7 +20,7 @@
#
#
-use Test::More tests => 121;
+use Test::More tests => 221;
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,236 @@ 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 ($ci_dir2) = $ctx->mkdir2(["$reposurl/dir2"]);
+# TEST
+isa_ok($ci_dir2,'_p_svn_commit_info_t');
+$current_rev++;
+# TEST
+is($ci_dir2->revision,$current_rev,"commit info revision equals $current_rev");
+
+my ($ci_dir3) = $ctx->mkdir3(["$reposurl/dir3"],0,undef);
+# TEST
+isa_ok($ci_dir3,'_p_svn_commit_info_t');
+$current_rev++;
+# TEST
+is($ci_dir3->revision,$current_rev,"commit info revision equals $current_rev");
+
+# TEST
+is($ctx->mkdir4(["$reposurl/dir4"],0,undef,sub {
+ my ($commit_info) = @_;
+
+ # TEST
+ isa_ok($commit_info,'_p_svn_commit_info_t','commit_info type check');
+
+ # TEST
+ is($commit_info->revision(),$current_rev + 1, 'commit info revision');
+
+ # TEST
+ like($commit_info->date(),
+ qr/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$/,
+ 'commit info date');
+
+ # TEST
+ is($commit_info->post_commit_err(),undef,'commit info post_commit_error');
+
+ # TEST
+ is($commit_info->repos_root(),$reposurl,'commit info repos_root');
+ }),
+ undef,'Returned undef from mkdir4 operation.');
+$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 +309,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 +340,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 +757,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"]);
-isa_ok($ci_dir2,'_p_svn_client_commit_info_t',
+my ($ci_dir5) = $ctx->mkdir(["$reposurl/dir5"]);
+# TEST
+isa_ok($ci_dir5,'_p_svn_client_commit_info_t',
'mkdir returns a _p_svn_client_commit_info_t');
$current_rev++;
-is($ci_dir2->revision(),$current_rev,
+# TEST
+is($ci_dir5->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 +858,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 +972,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 +987,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 +1007,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 +1029,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/ev2-export/subversion/bindings/swig/perl/native/t/4pool.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/4pool.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/4pool.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/4pool.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/perl/native/t/5delta-compat.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta-compat.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta-compat.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta-compat.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/perl/native/t/5delta.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/5delta.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/perl/native/t/6ra.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/6ra.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/6ra.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/6ra.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/perl/native/t/7editor.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/7editor.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/7editor.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/7editor.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/perl/native/t/8lock.t
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/8lock.t?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/8lock.t (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/t/8lock.t Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sun Oct 21 02:00:31 2012
@@ -988,7 +988,7 @@ apr_hash_t *svn_swig_py_mergeinfo_from_d
PyObject *key = PyList_GetItem(keys, i);
PyObject *value = PyDict_GetItem(dict, key);
const char *pathname = make_string_from_ob(key, pool);
- const apr_array_header_t *ranges = svn_swig_py_seq_to_array(value,
+ const svn_rangelist_t *ranges = svn_swig_py_seq_to_array(value,
sizeof(const svn_merge_range_t *),
svn_swig_py_unwrap_struct_ptr,
svn_swig_TypeQuery("svn_merge_range_t *"),
@@ -2159,6 +2159,24 @@ svn_swig_py_make_stream(PyObject *py_io,
return stream;
}
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info *op_type_info,
+ PyObject *parent_pool)
+{
+ PyObject *result = PyList_New(num_ops);
+ int i;
+
+ if (!result) return NULL;
+
+ for (i = 0; i < num_ops; ++i)
+ PyList_SET_ITEM(result, i,
+ svn_swig_NewPointerObj(ops + i, op_type_info,
+ parent_pool, NULL));
+
+ return result;
+}
void svn_swig_py_notify_func(void *baton,
const char *path,
@@ -4174,18 +4192,98 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
return callbacks;
}
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool)
+svn_boolean_t
+svn_swig_py_config_enumerator2(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool)
{
- PyObject *result = PyList_New(window->num_ops);
- int i;
+ PyObject *function = baton;
+ PyObject *result;
+ svn_error_t *err = SVN_NO_ERROR;
+ svn_boolean_t c_result;
- for (i = 0; i < window->num_ops; ++i)
- PyList_SET_ITEM(result, i,
- svn_swig_NewPointerObj(window->ops + i, op_type_info,
- window_pool, NULL));
+ svn_swig_py_acquire_py_lock();
- return result;
+ if ((result = PyObject_CallFunction(function,
+ (char *)"ssO&",
+ name,
+ value,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ /* Any Python exception we might have pending must be cleared,
+ because the SWIG wrapper will not check for it, and return a value with
+ the exception still set. */
+ PyErr_Clear();
+
+ 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();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ /* Any Python exception we might have pending must be cleared,
+ because the SWIG wrapper will not check for it, and return a value with
+ the exception still set. */
+ PyErr_Clear();
+
+ 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/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Sun Oct 21 02:00:31 2012
@@ -299,6 +299,15 @@ SVN_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_py_make_stream(PyObject *py_io,
apr_pool_t *pool);
+/* Convert ops, a C array of num_ops elements, to a Python list of SWIG
+ objects with descriptor op_type_info and pool set to parent_pool. */
+SVN_SWIG_SWIGUTIL_EXPORT
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info * op_type_info,
+ PyObject *parent_pool);
+
/* a notify function that executes a Python function that is passed in
via the baton argument */
SVN_SWIG_SWIGUTIL_EXPORT
@@ -520,16 +529,18 @@ svn_error_t *svn_swig_py_ra_lock_callbac
SVN_SWIG_SWIGUTIL_EXPORT
extern const svn_ra_reporter2_t swig_py_ra_reporter2;
-/* Get a list of ops from a window. Used to replace the naive
- svn_txdelta_window_t.ops accessor. op_type_info is supposed to be
- the SWIG descriptor of "svn_txdelta_op_t *". window_pool is supposed
- to be the pool associated with the window proxy and used for wrapping
- the op objects. */
SVN_SWIG_SWIGUTIL_EXPORT
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool);
+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
}
Modified: subversion/branches/ev2-export/subversion/bindings/swig/python/svn/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/svn/delta.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/svn/delta.py (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/svn/delta.py Sun Oct 21 02:00:31 2012
@@ -30,10 +30,6 @@ _unprefix_names(locals(), 'svn_txdelta_'
__all__ = filter(lambda x: x.lower().startswith('svn_'), locals().keys())
del _unprefix_names
-# Force our accessor since it appears that there isn't a more civilized way
-# to make SWIG use it.
-svn_txdelta_window_t.ops = property(svn_txdelta_window_t_ops_get)
-
class Editor:
def set_target_revision(self, target_revision, pool=None):
Modified: subversion/branches/ev2-export/subversion/bindings/swig/python/tests/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/tests/core.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/tests/core.py (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/tests/core.py Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/python/tests/pool.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/tests/pool.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/tests/pool.py (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/tests/pool.py Sun Oct 21 02:00:31 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/ev2-export/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/svn_delta.i?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/svn_delta.i Sun Oct 21 02:00:31 2012
@@ -174,61 +174,47 @@ svn_txdelta_window_t_ops_get(svn_txdelta
#ifdef SWIGPYTHON
%ignore svn_txdelta_window_t::ops;
-%inline %{
-static PyObject *
-svn_txdelta_window_t_ops_get(PyObject *window_ob)
+%extend svn_txdelta_window_t {
+
+void _ops_get(int *num_ops, svn_txdelta_op_t **ops)
{
- void *window;
- PyObject *ops_list, *window_pool;
- int status;
-
- /* Kludge alert!
- Normally, these kinds of conversions would belong in a typemap.
- However, typemaps won't allow us to change the result type to an array,
- so we have to make this custom accessor function.
- A cleaner approach would be to use something like:
-
- %extend svn_txdelta_window_t { void get_ops(apr_array_header_t ** ops); }
-
- But that means unnecessary copying, plus more hacks to get the pool for the
- array and for wrapping the individual op objects. So we just don't bother.
- */
+ *num_ops = self->num_ops;
+ *ops = self->ops;
+}
+
+%pythoncode {
+ ops = property(_ops_get)
+}
+}
+
+%typemap(argout) (int *num_ops, svn_txdelta_op_t **ops) {
+ apr_pool_t *parent_pool;
+ PyObject *parent_py_pool;
+ PyObject *ops_list;
- /* Note: the standard svn-python typemap releases the GIL while calling the
- wrapped function, but this function does Python stuff, so we have to
- reacquire it again. */
- svn_swig_py_acquire_py_lock();
- status = svn_swig_ConvertPtr(window_ob, &window,
- SWIG_TypeQuery("svn_txdelta_window_t *"));
-
- if (status != 0)
- {
- PyErr_SetString(PyExc_TypeError,
- "expected an svn_txdelta_window_t* proxy");
- svn_swig_py_release_py_lock();
- return NULL;
- }
-
- window_pool = PyObject_GetAttrString(window_ob, "_parent_pool");
-
- if (window_pool == NULL)
- {
- svn_swig_py_release_py_lock();
- return NULL;
- }
-
- ops_list = svn_swig_py_txdelta_window_t_ops_get(window,
- SWIG_TypeQuery("svn_txdelta_op_t *"), window_pool);
-
- svn_swig_py_release_py_lock();
+ if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+ &parent_py_pool, &parent_pool))
+ SWIG_fail;
- return ops_list;
+ ops_list = svn_swig_py_convert_txdelta_op_c_array(*$1, *$2,
+ $descriptor(svn_txdelta_op_t *), parent_py_pool);
+
+ if (!ops_list) SWIG_fail;
+
+ %append_output(ops_list);
}
-%}
#endif
%include svn_delta_h.swg
+#ifdef SWIGPYTHON
+%pythoncode {
+# This function is for backwards compatibility only.
+# Use svn_txdelta_window_t.ops instead.
+svn_txdelta_window_t_ops_get = svn_txdelta_window_t._ops_get
+}
+#endif
+
#ifdef SWIGRUBY
%inline %{
static VALUE
Modified: subversion/branches/ev2-export/subversion/bindings/swig/svn_wc.i
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/svn_wc.i?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/svn_wc.i (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/svn_wc.i Sun Oct 21 02:00:31 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/ev2-export/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_cache.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_cache.h Sun Oct 21 02:00:31 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/ev2-export/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_client_private.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_client_private.h Sun Oct 21 02:00:31 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.
@@ -178,64 +226,21 @@ svn_client__wc_node_get_origin(svn_clien
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* A macro to mark sections of code that belong to the 'symmetric merge'
- * feature while it's still new. */
-#define SVN_WITH_SYMMETRIC_MERGE
-
-#ifdef SVN_WITH_SYMMETRIC_MERGE
-
-/* Details of a symmetric merge. */
-typedef struct svn_client__symmetric_merge_t svn_client__symmetric_merge_t;
-
-/* Find the information needed to merge all unmerged changes from a source
- * branch into a target branch. The information is the locations of the
- * youngest common ancestor, merge base, and such like.
- *
- * Set *MERGE to the information needed to merge all unmerged changes
- * (up to SOURCE_REVISION) from the source branch SOURCE_PATH_OR_URL @
- * SOURCE_REVISION into the target WC at TARGET_WCPATH.
- */
-svn_error_t *
-svn_client__find_symmetric_merge(svn_client__symmetric_merge_t **merge,
- const char *source_path_or_url,
- const svn_opt_revision_t *source_revision,
- const char *target_wcpath,
- svn_boolean_t allow_mixed_rev,
- svn_boolean_t allow_local_mods,
- svn_boolean_t allow_switched_subtrees,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/* Perform a symmetric merge.
- *
- * Merge according to MERGE into the WC at TARGET_WCPATH.
- *
- * The other parameters are as in svn_client_merge4(). IGNORE_ANCESTRY
- * only controls the diffing of files, it doesn't prevent mergeinfo from
- * being used.
- *
- * ### TODO: There's little point in this function being the only way the
- * caller can use the result of svn_client__find_symmetric_merge(). The
- * contents of MERGE should be more public, or there should be other ways
- * the caller can use it, or these two functions should be combined into
- * one. I want to make it more public, and also possibly have more ways
- * to use it in future (for example, do_symmetric_merge_with_step_by_-
- * step_confirmation).
- */
-svn_error_t *
-svn_client__do_symmetric_merge(const svn_client__symmetric_merge_t *merge,
- const char *target_wcpath,
- svn_depth_t depth,
- svn_boolean_t ignore_ancestry,
- svn_boolean_t force,
- svn_boolean_t record_only,
- svn_boolean_t dry_run,
- const apr_array_header_t *merge_options,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
+/* Set *YCA, *BASE, *RIGHT, *TARGET to the repository locations of the
+ * youngest common ancestor of the branches, the base chosen for 3-way
+ * merge, the right-hand side of the source diff, and the target WC.
+ *
+ * Any of the output pointers may be NULL if not wanted.
+ */
+svn_error_t *
+svn_client__automatic_merge_get_locations(
+ svn_client__pathrev_t **yca,
+ svn_client__pathrev_t **base,
+ svn_client__pathrev_t **right,
+ svn_client__pathrev_t **target,
+ const svn_client_automatic_merge_t *merge,
+ apr_pool_t *result_pool);
-#endif /* SVN_WITH_SYMMETRIC_MERGE */
#ifdef __cplusplus
}
Modified: subversion/branches/ev2-export/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_cmdline_private.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_cmdline_private.h Sun Oct 21 02:00:31 2012
@@ -44,12 +44,14 @@ extern "C" {
* @a propname is the property name. @a propval is the property value, which
* will be encoded if it contains unsafe bytes.
*
- * @since New in 1.6.
+ * If @a inherited_prop is TRUE then @a propname is an inherited property,
+ * otherwise @a propname is an explicit property.
*/
void
svn_cmdline__print_xml_prop(svn_stringbuf_t **outstr,
const char *propname,
svn_string_t *propval,
+ svn_boolean_t inherited_prop,
apr_pool_t *pool);
Modified: subversion/branches/ev2-export/subversion/include/private/svn_dav_protocol.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_dav_protocol.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_dav_protocol.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_dav_protocol.h Sun Oct 21 02:00:31 2012
@@ -32,6 +32,7 @@ extern "C" {
/** Names for the custom HTTP REPORTs understood by mod_dav_svn, sans
namespace. */
#define SVN_DAV__MERGEINFO_REPORT "mergeinfo-report"
+#define SVN_DAV__INHERITED_PROPS_REPORT "inherited-props-report"
/** Names for XML child elements of the custom HTTP REPORTs understood
by mod_dav_svn, sans namespace. */
@@ -44,6 +45,10 @@ extern "C" {
#define SVN_DAV__REVISION "revision"
#define SVN_DAV__INCLUDE_DESCENDANTS "include-descendants"
#define SVN_DAV__VERSION_NAME "version-name"
+#define SVN_DAV__IPROP_ITEM "iprop-item"
+#define SVN_DAV__IPROP_PATH "iprop-path"
+#define SVN_DAV__IPROP_PROPNAME "iprop-propname"
+#define SVN_DAV__IPROP_PROPVAL "iprop-propval"
/** Names of XML elements attributes and tags for svn_ra_change_rev_prop2()'s
extension of PROPPATCH. */
Modified: subversion/branches/ev2-export/subversion/include/private/svn_debug.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_debug.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_debug.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_debug.h Sun Oct 21 02:00:31 2012
@@ -31,7 +31,9 @@
### remain in the code. at that point, we can rejigger this header. */
#ifdef SVN_DEBUG
-#include <stdio.h>
+#define APR_WANT_STDIO
+#include <apr_want.h>
+#include <apr_hash.h>
#ifdef __cplusplus
extern "C" {
Modified: subversion/branches/ev2-export/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_dep_compat.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_dep_compat.h Sun Oct 21 02:00:31 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/ev2-export/subversion/include/private/svn_eol_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_eol_private.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_eol_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_eol_private.h Sun Oct 21 02:00:31 2012
@@ -37,6 +37,20 @@
extern "C" {
#endif /* __cplusplus */
+/* Constants used by various chunky string processing functions.
+ */
+#if APR_SIZEOF_VOIDP == 8
+# define SVN__LOWER_7BITS_SET 0x7f7f7f7f7f7f7f7f
+# define SVN__BIT_7_SET 0x8080808080808080
+# define SVN__R_MASK 0x0a0a0a0a0a0a0a0a
+# define SVN__N_MASK 0x0d0d0d0d0d0d0d0d
+#else
+# define SVN__LOWER_7BITS_SET 0x7f7f7f7f
+# define SVN__BIT_7_SET 0x80808080
+# define SVN__R_MASK 0x0a0a0a0a
+# define SVN__N_MASK 0x0d0d0d0d
+#endif
+
/* Generic EOL character helper routines */
/* Look for the start of an end-of-line sequence (i.e. CR or LF)
Modified: subversion/branches/ev2-export/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_fs_util.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_fs_util.h Sun Oct 21 02:00:31 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/ev2-export/subversion/include/private/svn_log.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_log.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_log.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_log.h Sun Oct 21 02:00:31 2012
@@ -244,6 +244,15 @@ svn_log__unlock_one_path(const char *pat
const char *
svn_log__replay(const char *path, svn_revnum_t rev, apr_pool_t *pool);
+/**
+ * Return a log string for a get-inherited-props action.
+ *
+ * @since New in 1.8.
+ */
+const char *
+svn_log__get_inherited_props(const char *path,
+ svn_revnum_t rev,
+ apr_pool_t *pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/ev2-export/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_mergeinfo_private.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_mergeinfo_private.h Sun Oct 21 02:00:31 2012
@@ -41,7 +41,7 @@ extern "C" {
/* Set inheritability of all ranges in RANGELIST to INHERITABLE.
If RANGELIST is NULL do nothing. */
void
-svn_rangelist__set_inheritance(apr_array_header_t *rangelist,
+svn_rangelist__set_inheritance(svn_rangelist_t *rangelist,
svn_boolean_t inheritable);
/* Parse a rangelist from the string STR. Set *RANGELIST to the result,
@@ -52,7 +52,7 @@ svn_rangelist__set_inheritance(apr_array
* Unlike svn_mergeinfo_parse(), this does not sort the ranges into order
* or combine adjacent and overlapping ranges. */
svn_error_t *
-svn_rangelist__parse(apr_array_header_t **rangelist,
+svn_rangelist__parse(svn_rangelist_t **rangelist,
const char *str,
apr_pool_t *result_pool);
@@ -125,20 +125,6 @@ svn_mergeinfo__add_prefix_to_catalog(svn
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Set *OUT_MERGEINFO to a shallow copy of MERGEINFO with each source path
- converted to a (URI-encoded) URL based on REPOS_ROOT_URL. *OUT_MERGEINFO
- is declared as 'apr_hash_t *' because its key do not obey the rules of
- 'svn_mergeinfo_t'.
-
- Allocate *OUT_MERGEINFO and the new keys in RESULT_POOL. Use
- SCRATCH_POOL for any temporary allocations. */
-svn_error_t *
-svn_mergeinfo__relpaths_to_urls(apr_hash_t **out_mergeinfo,
- svn_mergeinfo_t mergeinfo,
- const char *repos_root_url,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* Set *OUT_MERGEINFO to a shallow copy of MERGEINFO with the relpath
SUFFIX_RELPATH added to the end of each key path.
@@ -170,20 +156,6 @@ svn_mergeinfo__catalog_to_formatted_stri
const char *val_prefix,
apr_pool_t *pool);
-/* Create a string representation of MERGEINFO in *OUTPUT, allocated in POOL.
- Unlike svn_mergeinfo_to_string(), NULL MERGEINFO is tolerated and results
- in *OUTPUT set to "\n". If SVN_DEBUG is true, then NULL or empty MERGEINFO
- causes *OUTPUT to be set to an appropriate newline terminated string. If
- PREFIX is not NULL then prepend PREFIX to each line in *OUTPUT.
-
- Any relative merge source paths in MERGEINFO are converted to absolute
- paths in *OUTPUT.*/
-svn_error_t *
-svn_mergeinfo__to_formatted_string(svn_string_t **output,
- svn_mergeinfo_t mergeinfo,
- const char *prefix,
- apr_pool_t *pool);
-
/* Set *YOUNGEST_REV and *OLDEST_REV to the youngest and oldest revisions
found in the rangelists within MERGEINFO. Note that *OLDEST_REV is
exclusive and *YOUNGEST_REV is inclusive. If MERGEINFO is NULL or empty
@@ -239,7 +211,7 @@ svn_mergeinfo__is_noninheritable(svn_mer
/* Return a rangelist with one svn_merge_range_t * element defined by START,
END, and INHERITABLE. The rangelist and its contents are allocated in
RESULT_POOL. */
-apr_array_header_t *
+svn_rangelist_t *
svn_rangelist__initialize(svn_revnum_t start,
svn_revnum_t end,
svn_boolean_t inheritable,
@@ -277,7 +249,7 @@ svn_mergeinfo__mergeinfo_from_segments(s
* RESULT_POOL. See svn_rangelist_merge2() for details of inheritability
* etc. */
svn_error_t *
-svn_rangelist__merge_many(apr_array_header_t *merged_rangelist,
+svn_rangelist__merge_many(svn_rangelist_t *merged_rangelist,
svn_mergeinfo_t mergeinfo,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);