subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1658362 [3/34] - in /subversion/branches/remove-log-addressing: ./ build/ build/generator/ build/generator/templates/ notes/ subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/j...
Date Mon, 09 Feb 2015 11:23:43 GMT
Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java Mon Feb  9 11:23:39 2015
@@ -627,16 +627,41 @@ public class UtilTests extends SVNTests
     private static final String util_cred_ssl_server =
         "K 10\n" +
         "ascii_cert\n" +
-        "V 12\n" +
-        "NotTelling==\n" +
+        "V 1616\n" +
+        "MIIEtzCCA5+gAwIBAgIQWGBOrapkezd+BWVsAtmtmTANBgkqhkiG9w0BAQsFADA8" +
+        "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U" +
+        "aGF3dGUgU1NMIENBMB4XDTE0MDQxMTAwMDAwMFoXDTE2MDQwNzIzNTk1OVowgYsx" +
+        "CzAJBgNVBAYTAlVTMREwDwYDVQQIEwhNYXJ5bGFuZDEUMBIGA1UEBxQLRm9yZXN0" +
+        "IEhpbGwxIzAhBgNVBAoUGkFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0aW9uMRcwFQYD" +
+        "VQQLFA5JbmZyYXN0cnVjdHVyZTEVMBMGA1UEAxQMKi5hcGFjaGUub3JnMIIBIjAN" +
+        "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Tq4mH+stRoxe4xth8tUCgLt+P4L" +
+        "D/JWZz4a2IecaaAk57vIlTxEyP16fUShUfxVJnD0KV11zv2qaEUXNaA6hKd4H/oB" +
+        "u2OyGev+quRM+aFCjWqASkXt7fLGsIkHAwP3XwBVBpARbcXJeCjCBxqaYrQqS8LT" +
+        "wfPUD9eYncGlQ+ixb3Bosy7TmkWKeLsRdS90cAO/rdgQ8OI7kLT/1tr5GpF9RmXo" +
+        "RnVqMP+U0zGd/BNNSneg7emb7TxLzxeMKZ7QbF4MZi8RRN11spvx8/f92CiYrGGu" +
+        "y67VdOGPaomYc+VZ2syLwduHGK40ADrEK3+MQpsRFB0dM08j9bhpr5A44wIDAQAB" +
+        "o4IBYzCCAV8wFwYDVR0RBBAwDoIMKi5hcGFjaGUub3JnMAkGA1UdEwQCMAAwQgYD" +
+        "VR0gBDswOTA3BgpghkgBhvhFAQc2MCkwJwYIKwYBBQUHAgEWG2h0dHBzOi8vd3d3" +
+        "LnRoYXd0ZS5jb20vY3BzLzAOBgNVHQ8BAf8EBAMCBaAwHwYDVR0jBBgwFoAUp6KD" +
+        "uzRFQD381TBPErk+oQGf9tswOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL3N2ci1v" +
+        "di1jcmwudGhhd3RlLmNvbS9UaGF3dGVPVi5jcmwwHQYDVR0lBBYwFAYIKwYBBQUH" +
+        "AwEGCCsGAQUFBwMCMGkGCCsGAQUFBwEBBF0wWzAiBggrBgEFBQcwAYYWaHR0cDov" +
+        "L29jc3AudGhhd3RlLmNvbTA1BggrBgEFBQcwAoYpaHR0cDovL3N2ci1vdi1haWEu" +
+        "dGhhd3RlLmNvbS9UaGF3dGVPVi5jZXIwDQYJKoZIhvcNAQELBQADggEBAF52BLvl" +
+        "x5or9/aO7+cPhxuPxwiNRgbvHdCakD7n8vzjNyct9fKp6/XxB6GQiTZ0nZPJOyIu" +
+        "Pi1QDLKOXvaPeLKDBilL/+mrn/ev3s/aRQSrUsieKDoQnqtmlxEHc/T3+Ni/RZob" +
+        "PD4GzPuNKpK3BIc0fk/95T8R1DjBSQ5/clvkzOKtcl3VffAwnHiE9TZx9js7kZwO" +
+        "b9nOKX8DFao3EpQcS7qn63Ibzbq5A6ry8ZNRQSIJK/xlCAWoyUd1uxnqGFnus8wb" +
+        "9RVZJQe8YvyytBjgbE3QjnfPOxoEJA3twupnPmH+OCTM6V3TZqpRZj/sZ5rtIQ++" +
+        "hI5FdJWUWVSgnSw=\n" +
         "K 8\n" +
         "failures\n" +
         "V 1\n" +
         "8\n" +
         "K 15\n" +
         "svn:realmstring\n" +
-        "V 27\n" +
-        "https://svn.example.com:443\n" +
+        "V 26\n" +
+        "https://svn.apache.org:443\n" +
         "END\n";
 
     private static final String util_cred_ssl_client_passphrase =
@@ -717,9 +742,12 @@ public class UtilTests extends SVNTests
         /* one SSL server trust credential */
         cred = SVNUtil.getCredential(configDir,
                                      SVNUtil.Credential.Kind.sslServer,
-                                     "https://svn.example.com:443");
+                                     "https://svn.apache.org:443");
         assertNotNull(cred);
-        assertEquals(cred.getServerCertInfo().getDER(), "NotTelling==");
+        assertEquals(cred.getServerCertInfo().getSubject(),
+                     "C=US, ST=Maryland, L=Forest Hill, " +
+                     "O=Apache Software Foundation, OU=Infrastructure, " +
+                     "CN=*.apache.org");
 
         /* one SSL client passphrase credential */
         cred = SVNUtil.getCredential(configDir,
@@ -764,10 +792,16 @@ public class UtilTests extends SVNTests
         assertNotNull(creds);
         assertEquals(creds.size(), 2);
 
+        /* search with match on subvject */
+        creds = SVNUtil.searchCredentials(configDir, null,
+                                          null, null, "\\*.apache.org", null);
+        assertNotNull(creds);
+        assertEquals(creds.size(), 1);
+
         /* search with match on realm */
         creds = SVNUtil.searchCredentials(configDir, null,
                                           "*example*", null, null, null);
         assertNotNull(creds);
-        assertEquals(creds.size(), 4);
+        assertEquals(creds.size(), 3);
     }
 }

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java Mon Feb  9 11:23:39 2015
@@ -232,8 +232,9 @@ class SVNTests extends TestCase
         greekDump = new File(localTmp, "greek_dump");
         admin.create(greekRepos.getAbsolutePath(), true,false, null,
                      this.fsType);
-        addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
-                              NodeKind.none, CommitItemStateFlags.Add);
+        addExpectedCommitItem(greekFiles.getAbsolutePath(),
+                              makeReposUrl(greekRepos).toString(), null,
+                              NodeKind.dir, CommitItemStateFlags.Add);
         client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos),
                         null, true );
         admin.dump(greekRepos.getAbsolutePath(), new FileOutputer(greekDump),

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/core.i?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/core.i (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/core.i Mon Feb  9 11:23:39 2015
@@ -800,10 +800,11 @@ core_set_current_pool (apr_pool_t *pool)
 #endif
 
 #ifdef SWIGPYTHON
-# The auth baton depends on the providers, so we preserve a
-# reference to them inside the wrapper. This way, if all external
-# references to the providers are gone, they will still be alive,
-# keeping the baton valid.
+/* The auth baton depends on the providers, so we preserve a
+   reference to them inside the wrapper. This way, if all external
+   references to the providers are gone, they will still be alive,
+   keeping the baton valid.
+ */
 %feature("pythonappend") svn_auth_open %{
   val.__dict__["_deps"] = list(args[0])
 %}

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/include/svn_types.swg?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/include/svn_types.swg Mon Feb  9 11:23:39 2015
@@ -146,7 +146,8 @@
   /* svn_repos */
   svn_authz_t **,
   svn_repos_t **,
-  const svn_repos_parse_fns2_t **,
+  const svn_repos_parse_fns3_t **,
+  const svn_repos_parser_fns2_t **,
   const svn_repos_parser_fns_t **,
   void **parse_baton,
   void **revision_baton,
@@ -806,20 +807,12 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
    Callback: svn_cancel_func_t
 */
 
-#ifdef SWIGPYTHON
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton) {
-  $1 = svn_swig_py_cancel_func;
-  $2 = $input; /* our function is the baton. */
-}
-#endif
+%callback_typemap(svn_cancel_func_t cancel_func, void *cancel_baton,
+                  svn_swig_py_cancel_func,
+                  svn_swig_pl_cancel_func,
+                  svn_swig_rb_cancel_func)
 
 #ifdef SWIGRUBY
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton)
-{
-  $1 = svn_swig_rb_cancel_func;
-  $2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
-}
-
 %typemap(argout) (svn_cancel_func_t cancel_func, void *cancel_baton)
 {
   svn_swig_rb_set_baton($result, (VALUE)$2);

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Client.pm?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Client.pm Mon Feb  9 11:23:39 2015
@@ -55,8 +55,7 @@ SVN::Client - Subversion client function
                                            0,           #no_auth_cache
                                            0,           #trust_server_cert
                                            $config_category,
-                                           undef,       #cancel_func
-                                           undef)       #cancel_baton
+                                           undef)       #cancel_callback
     );
 
     # Use first argument as target and canonicalize it before using
@@ -1286,24 +1285,8 @@ sub log_msg {
 =item $client-E<gt>cancel(\&cancel)
 
 Sets the cancellation callback for the client context to a code reference that you
-pass.  It always returns the current codereference set.
-
-The subroutine pointed to by this value will be called to see if the operation
-should be canceled.  If the operation should be canceled, the function may
-return one of the following values:
-
-An svn_error_t object made with SVN::Error::create.
-
-Any true value, in which case the bindings will generate an svn_error_t object
-for you with the error code of SVN_ERR_CANCELLED and the string set to "By
-cancel callback".
-
-A string, in which case the bindings will generate an svn_error_t object for you
-with the error code of SVN_ERR_CANCELLED and the string set to the string you
-returned.
-
-Any other value will be interpreted as wanting to continue the operation.
-Generally, it's best to return 0 to continue the operation.
+pass. See L<"CANCELLATION CALLBACK"> below for details.
+It always returns the current codereference set.
 
 =cut
 
@@ -1489,6 +1472,25 @@ may_save.
 
 =back
 
+=head1 CANCELLATION CALLBACK
+
+This callback will be called periodically to see if the operation
+should be canceled.  If the operation should be canceled, the function may
+return one of the following values:
+
+An svn_error_t object made with SVN::Error::create.
+
+Any true value, in which case the bindings will generate an svn_error_t object
+for you with the error code of SVN_ERR_CANCELLED and the string set to "By
+cancel callback".
+
+A string, in which case the bindings will generate an svn_error_t object for you
+with the error code of SVN_ERR_CANCELLED and the string set to the string you
+returned.
+
+Any other value will be interpreted as wanting to continue the operation.
+Generally, it's best to return 0 to continue the operation.
+
 =head1 OBJECTS
 
 These are some of the object types that are returned from the methods

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Repos.pm
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Repos.pm?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Repos.pm (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/Repos.pm Mon Feb  9 11:23:39 2015
@@ -42,9 +42,9 @@ object.
 
 =over
 
-=item $repos-E<gt>dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_func, $cancel_baton)
+=item $repos-E<gt>dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_callback)
 
-=item $repos-E<gt>dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_func, $cancel_baton)
+=item $repos-E<gt>dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_callback)
 
 Create a dump file of the repository from revision C<$start_rev> to C<$end_rev>
 , store it into the filehandle C<$dump_fh>, and write feedback on the progress
@@ -61,10 +61,9 @@ this flag is set, the first revision of
 be done with full plain text.  A dump with @a use_deltas set cannot
 be loaded by Subversion 1.0.x.
 
-According to svn_repos.h, the C<$cancel_func> is a function that is called
-periodically and given C<$cancel_baton> as a parameter to determine whether
-the client wishes to cancel the dump.  You must supply C<undef> at the very
-least.
+If C<$cancel_callback> is not C<undef>, it must be a code reference
+that is called periodically to determine whether the client wishes 
+to cancel the dump.  See L<SVN::Client/"CANCELLATION CALLBACK"> for details.
 
 Example:
 
@@ -83,13 +82,13 @@ Example:
     $repos->dump_fs2($fh, \*STDOUT,          # Dump file => $fh, Feedback => STDOUT
                      $start_rev, $end_rev,   # Revision Range
                      $incremental, $deltify, # Options
-                     undef, undef);          # Cancel Function
+                     undef);                 # Cancel Callback
 
     close $fh;
 
-=item $repos-E<gt>load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_callback);
 
-=item $repos-E<gt>load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_callback);
 
 Loads a dumpfile specified by the C<$dumpfile_fh> filehandle into the repository.
 If the dumpstream contains copy history that is unavailable in the repository,
@@ -113,11 +112,11 @@ hook before committing each loaded revis
 If C<$use_post_commit_hook> is set, call the repository's
 post-commit hook after committing each loaded revision.
 
-If C<$cancel_func> is not NULL, it is called periodically with
-C<$cancel_baton> as argument to see if the client wishes to cancel
-the load.
+If C<$cancel_callback> is not C<undef>, it must be a code reference 
+that is called periodically to determine whether the client wishes
+to cancel the load.  See L<SVN::Client/"CANCELLATION CALLBACK"> for details.
 
-You must at least provide undef for these parameters for the method call
+You must at least provide C<undef> for these parameters for the method call
 to work.
 
 Example:

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/1repos.t
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/1repos.t?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/1repos.t (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/1repos.t Mon Feb  9 11:23:39 2015
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 #
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,16 +20,21 @@
 #
 #
 
-use Test::More tests => 6;
+use strict;
+use warnings;
+
+use Test::More tests => 8;
 use File::Temp qw(tempdir);
 use File::Path qw(rmtree);
-use strict;
+use File::Spec;
+use POSIX qw(locale_h);
+
+use SVN::Core;
+use SVN::Repos;
+use SVN::Fs;
+use SVN::Delta;
 
-require SVN::Core;
-require SVN::Repos;
-require SVN::Fs;
-require SVN::Delta;
-use File::Path;
+setlocale(LC_ALL, "C");
 
 my $repospath = tempdir('svn-perl-test-XXXXXX', TMPDIR => 1, CLEANUP => 1);
 
@@ -107,6 +112,26 @@ ok($main::something_destroyed, 'callback
 # TEST
 cmp_ok($fs->youngest_rev, '==', 3);
 
+open my $dump_fh, ">", File::Spec->devnull or die "open file sink: $!";
+
+my $feedback;
+open my $feedback_fh, ">", \$feedback or die "open string: $!";
+
+my $cancel_cb_called = 0;
+$repos->dump_fs2($dump_fh, $feedback_fh,
+                 0, $SVN::Core::INVALID_REVNUM,     # start_rev, end_rev
+                 0, 0,                              # incremental, deltify
+                 sub { $cancel_cb_called++; 0 });
+# TEST
+ok($cancel_cb_called, 'cancel callback was called');
+# TEST
+is($feedback, <<'...', 'dump feedback');
+* Dumped revision 0.
+* Dumped revision 1.
+* Dumped revision 2.
+* Dumped revision 3.
+...
+
 END {
 diag "cleanup";
 rmtree($repospath);

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/3client.t?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/3client.t Mon Feb  9 11:23:39 2015
@@ -20,7 +20,7 @@
 #
 #
 
-use Test::More tests => 297;
+use Test::More tests => 302;
 use strict;
 
 # shut up about variables that are only used once.
@@ -1119,6 +1119,45 @@ isa_ok($ph2,'HASH','propget returns HASH
 is(scalar(keys %$ph2),0,
    'No properties after deleting a property');
 
+# test cancel callback
+my $cancel_cb_called = 0;
+$ctx->cancel(sub { $cancel_cb_called++; 0 });
+my $log_entries_received = 0;
+$ctx->log5($reposurl,
+              'HEAD',['HEAD',1],0, # peg rev, rev ranges, limit
+              1,1,0, # discover_changed_paths, strict_node_history, include_merged_revisions
+              undef, # revprops
+              sub { $log_entries_received++ });
+# TEST
+ok($cancel_cb_called, 'cancel callback was called');
+# TEST
+is($log_entries_received, $current_rev, 'log entries received');
+
+my $cancel_msg = "stop the presses";
+$ctx->cancel(sub { $cancel_msg });
+$svn_error = $ctx->log5($reposurl,
+              'HEAD',['HEAD',1],0, # peg rev, rev ranges, limit
+              1,1,0, # discover_changed_paths, strict_node_history, include_merged_revisions
+              undef, # revprops
+              sub { });
+# TEST
+isa_ok($svn_error, '_p_svn_error_t', 'return of a cancelled operation');
+# TEST
+is($svn_error->apr_err, $SVN::Error::CANCELLED, "SVN_ERR_CANCELLED");
+{
+    # If we're running a debug build, $svn_error may be the top of a
+    # chain of svn_error_t's (all with message "traced call"), we need 
+    # to get to the bottom svn_error_t to check for the original message.
+    my $chained = $svn_error;
+    $chained = $chained->child while $chained->child;
+    # TEST
+    is($chained->message, $cancel_msg, 'cancellation message');
+}
+
+$svn_error->clear(); # don't leak this
+$ctx->cancel(undef); # reset cancel callback
+
+
 SKIP: {
     # This is ugly.  It is included here as an aide to understand how
     # to test this and because it makes my life easier as I only have

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/6ra.t
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/6ra.t?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/6ra.t (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/perl/native/t/6ra.t Mon Feb  9 11:23:39 2015
@@ -202,12 +202,6 @@ is($ed->{trunk}{props}{'dir-prop'}, 'fro
 is($ed->{'trunk/filea'}{props}{'binary-prop'}, $BINARY_DATA,
    'replay: binary-prop');
 
-END {
-diag "cleanup";
-rmtree($repospath);
-}
-
-
 package MockEditor;
 
 sub new { bless {}, shift }

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Mon Feb  9 11:23:39 2015
@@ -1540,6 +1540,7 @@ static svn_error_t *type_conversion_erro
 typedef struct item_baton {
   PyObject *editor;     /* the editor handling the callbacks */
   PyObject *baton;      /* the dir/file baton (or NULL for edit baton) */
+  apr_pool_t *pool;     /* top-level pool */
 } item_baton;
 
 static item_baton *make_baton(apr_pool_t *pool,
@@ -1548,13 +1549,11 @@ static item_baton *make_baton(apr_pool_t
 {
   item_baton *newb = apr_palloc(pool, sizeof(*newb));
 
-  /* Note: We steal the caller's reference to 'baton'. Also, to avoid
-     memory leaks, we borrow the caller's reference to 'editor'. In this
-     case, borrowing the reference to 'editor' is safe because the contents
-     of an item_baton struct are only used by function calls which operate on
-     the editor itself. */
+  /* Note: We steal the caller's reference to 'baton'. */
+  Py_INCREF(editor);
   newb->editor = editor;
   newb->baton = baton;
+  newb->pool = pool;
 
   return newb;
 }
@@ -1583,6 +1582,9 @@ static svn_error_t *close_baton(void *ba
   /* there is no return value, so just toss this object (probably Py_None) */
   Py_DECREF(result);
 
+  /* Release the editor object */
+  Py_DECREF(ib->editor);
+
   /* We're now done with the baton. Since there isn't really a free, all
      we need to do is note that its objects are no longer referenced by
      the baton.  */
@@ -2044,6 +2046,373 @@ void svn_swig_py_make_editor(const svn_d
   *edit_baton = make_baton(pool, py_editor, NULL);
 }
 
+
+/* Wrappers for dump stream parser */
+
+static svn_error_t *parse_fn3_magic_header_record(int version,
+                                                  void *parse_baton,
+                                                  apr_pool_t *pool)
+{
+  item_baton *ib = parse_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"magic_header_record",
+                                    (char *)"lO&", version,
+                                    make_ob_pool, pool)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_uuid_record(const char *uuid,
+                                          void *parse_baton,
+                                          apr_pool_t *pool)
+{
+  item_baton *ib = parse_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"uuid_record",
+                                    (char *)"sO&", uuid,
+                                    make_ob_pool, pool)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_new_revision_record(void **revision_baton,
+                                                  apr_hash_t *headers,
+                                                  void *parse_baton,
+                                                  apr_pool_t *pool)
+{
+  item_baton *ib = parse_baton;
+  PyObject *result;
+  PyObject *tmp;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"new_revision_record",
+                                   (char *)"O&O&",
+                                   svn_swig_py_stringhash_to_dict, headers,
+                                   make_ob_pool, pool)) == NULL) {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* make_baton takes our 'result' reference */
+  *revision_baton = make_baton(pool, ib->editor, result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_new_node_record(void **node_baton,
+                                              apr_hash_t *headers,
+                                              void *revision_baton,
+                                              apr_pool_t *pool)
+{
+  item_baton *ib = revision_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"new_node_record",
+                                   (char *)"O&OO&",
+                                   svn_swig_py_stringhash_to_dict, headers,
+                                   ib->baton,
+                                   make_ob_pool, pool)) == NULL) {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* make_baton takes our 'result' reference */
+  *node_baton = make_baton(pool, ib->editor, result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_set_revision_property(void *revision_baton,
+                                                    const char *name,
+                                                    const svn_string_t *value)
+{
+  item_baton *ib = revision_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"set_revision_property",
+                                    (char *)"Oss#", ib->baton, name,
+                                    value ? value->data : NULL,
+                                    value ? value->len : 0)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_set_node_property(void *node_baton,
+                                                const char *name,
+                                                const svn_string_t *value)
+{
+  item_baton *ib = node_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"set_node_property",
+                                    (char *)"Oss#", ib->baton, name,
+                                    value ? value->data : NULL,
+                                    value ? value->len : 0)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_delete_node_property(void *node_baton,
+                                                   const char *name)
+{
+  item_baton *ib = node_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"delete_node_property",
+                                    (char *)"Os", ib->baton, name)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_remove_node_props(void *node_baton)
+{
+  item_baton *ib = node_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"remove_node_props",
+                                    (char *)"(O)", ib->baton)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* there is no return value, so just toss this object (probably Py_None) */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_set_fulltext(svn_stream_t **stream,
+                                           void *node_baton)
+{
+  item_baton *ib = node_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"set_fulltext",
+                                    (char *)"(O)", ib->baton)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* Interpret None to mean NULL - no text is desired */
+  if (result == Py_None)
+    {
+      *stream = NULL;
+    }
+  else
+    {
+      /* create a stream from the IO object. it will increment the
+         reference on the 'result'. */
+      *stream = svn_swig_py_make_stream(result, ib->pool);
+    }
+
+  /* if the handler returned an IO object, svn_swig_py_make_stream() has
+     incremented its reference counter. If it was None, it is discarded. */
+  Py_DECREF(result);
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_apply_textdelta(svn_txdelta_window_handler_t *handler,
+                                              void **handler_baton,
+                                              void *node_baton)
+{
+  item_baton *ib = node_baton;
+  PyObject *result;
+  svn_error_t *err;
+
+  svn_swig_py_acquire_py_lock();
+
+  /* ### python doesn't have 'const' on the method name and format */
+  if ((result = PyObject_CallMethod(ib->editor, (char *)"apply_textdelta",
+                                    (char *)"(O)", ib->baton)) == NULL)
+    {
+      err = callback_exception_error();
+      goto finished;
+    }
+
+  /* Interpret None to mean svn_delta_noop_window_handler. This is much
+     easier/faster than making code always have to write a NOOP handler
+     in Python.  */
+  if (result == Py_None)
+    {
+      Py_DECREF(result);
+
+      *handler = svn_delta_noop_window_handler;
+      *handler_baton = NULL;
+    }
+  else
+    {
+      /* return the thunk for invoking the handler. the baton takes our
+         'result' reference, which is the handler. */
+      *handler = window_handler;
+      *handler_baton = result;
+    }
+
+  err = SVN_NO_ERROR;
+
+ finished:
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+static svn_error_t *parse_fn3_close_node(void *node_baton)
+{
+  return close_baton(node_baton, "close_node");
+}
+
+
+static svn_error_t *parse_fn3_close_revision(void *revision_baton)
+{
+  return close_baton(revision_baton, "close_revision");
+}
+
+
+static const svn_repos_parse_fns3_t thunk_parse_fns3_vtable = 
+  {
+    parse_fn3_magic_header_record,
+    parse_fn3_uuid_record,
+    parse_fn3_new_revision_record,
+    parse_fn3_new_node_record,
+    parse_fn3_set_revision_property,
+    parse_fn3_set_node_property,
+    parse_fn3_delete_node_property,
+    parse_fn3_remove_node_props,
+    parse_fn3_set_fulltext,
+    parse_fn3_apply_textdelta,
+    parse_fn3_close_node,
+    parse_fn3_close_revision
+  };
+
+static apr_status_t
+svn_swig_py_parse_fns3_destroy(void *parse_baton)
+{
+  close_baton(parse_baton, "_close_dumpstream");
+  return APR_SUCCESS;
+}
+
+void svn_swig_py_make_parse_fns3(const svn_repos_parse_fns3_t **parse_fns3,
+                                 void **parse_baton,
+                                 PyObject *py_parse_fns3,
+                                 apr_pool_t *pool)
+{
+  *parse_fns3 = &thunk_parse_fns3_vtable;
+  *parse_baton = make_baton(pool, py_parse_fns3, NULL);
+
+  /* Dump stream vtable does not provide a method which is called right before
+     the end of the parsing (similar to close_edit/abort_edit in delta editor).
+     Thus, register a pool clean-up routine to release this parse baton. */
+  apr_pool_cleanup_register(pool, *parse_baton, svn_swig_py_parse_fns3_destroy,
+                            apr_pool_cleanup_null);
+}
 
 
 /*** Other Wrappers for SVN Functions ***/

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Mon Feb  9 11:23:39 2015
@@ -252,6 +252,12 @@ void svn_swig_py_make_editor(const svn_d
                              PyObject *py_editor,
                              apr_pool_t *pool);
 
+/* make a parse vtable that "thunks" from C callbacks up to Python */
+void svn_swig_py_make_parse_fns3(const svn_repos_parse_fns3_t **parse_fns3,
+                                 void **parse_baton,
+                                 PyObject *py_parse_fns3,
+                                 apr_pool_t *pool);
+
 apr_file_t *svn_swig_py_make_file(PyObject *py_file,
                                   apr_pool_t *pool);
 

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/core.py?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/core.py (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/core.py Mon Feb  9 11:23:39 2015
@@ -191,8 +191,9 @@ class Stream:
     svn_stream_write(self._stream, buf)
 
   def close(self):
-    svn_stream_close(self._stream)
-    self._stream = None
+    if self._stream is not None:
+      svn_stream_close(self._stream)
+      self._stream = None
 
 def secs_from_timestr(svn_datetime, pool=None):
   """Convert a Subversion datetime string into seconds since the Epoch."""

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/repos.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/repos.py?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/repos.py (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/svn/repos.py Mon Feb  9 11:23:39 2015
@@ -285,3 +285,56 @@ class RevisionChangeCollector(ChangeColl
     if idx == -1:
       return parent_path + '/' + path
     return parent_path + path[idx:]
+
+
+class ParseFns3:
+    def __init__(self):
+        pass
+
+    def __del__(self):
+        pass
+
+    def _close_dumpstream(self):
+        # Does not correspond to a C method - called before finishing the
+        # parsing of the dump stream.
+        pass
+
+    def magic_header_record(self, version, pool=None):
+        pass
+
+    def uuid_record(self, uuid, pool=None):
+        pass
+
+    def new_revision_record(self, headers, pool=None):
+        return None # Returns revision_baton
+
+    def new_node_record(self, headers, revision_baton, pool=None):
+        return None # Returns node_baton
+
+    def set_revision_property(self, revision_baton, name, value):
+        pass
+
+    def set_node_property(self, node_baton, name, value):
+        pass
+
+    def delete_node_property(self, node_baton, name):
+        pass
+
+    def remove_node_props(self, node_baton):
+        pass
+
+    def set_fulltext(self, node_baton):
+        return None # Returns a writable stream
+
+    def apply_textdelta(self, node_baton):
+        return None # Returns delta window handler
+
+    def close_node(self, node_baton):
+        pass
+
+    def close_revision(self, revision_baton):
+        pass
+
+
+def make_parse_fns3(parse_fns3, pool=None):
+    return svn_swig_py_make_parse_fns3(parse_fns3, pool)

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/tests/repository.py?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/tests/repository.py Mon Feb  9 11:23:39 2015
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, setup_path
+import unittest, setup_path, os, sys
 from sys import version_info # For Python version check
 if version_info[0] >= 3:
   # Python >=3.0
@@ -44,6 +44,42 @@ class ChangeReceiver(delta.Editor):
         self.textdeltas.append(textdelta)
     return textdelta_handler
 
+class DumpStreamParser(repos.ParseFns3):
+  def __init__(self):
+    repos.ParseFns3.__init__(self)
+    self.ops = []
+  def magic_header_record(self, version, pool=None):
+    self.ops.append(("magic-header", version))
+  def uuid_record(self, uuid, pool=None):
+    self.ops.append(("uuid", uuid))
+  def new_revision_record(self, headers, pool=None):
+    rev = int(headers[repos.DUMPFILE_REVISION_NUMBER])
+    self.ops.append(("new-revision", rev))
+    return rev
+  def close_revision(self, revision_baton):
+    self.ops.append(("close-revision", revision_baton))
+  def new_node_record(self, headers, revision_baton, pool=None):
+    node = headers[repos.DUMPFILE_NODE_PATH]
+    self.ops.append(("new-node", revision_baton, node))
+    return (revision_baton, node)
+  def close_node(self, node_baton):
+    self.ops.append(("close-node", node_baton[0], node_baton[1]))
+  def set_revision_property(self, revision_baton, name, value):
+    self.ops.append(("set-revision-prop", revision_baton, name, value))
+  def set_node_property(self, node_baton, name, value):
+    self.ops.append(("set-node-prop", node_baton[0], node_baton[1], name, value))
+  def remove_node_props(self, node_baton):
+    self.ops.append(("remove-node-props", node_baton[0], node_baton[1]))
+  def delete_node_property(self, node_baton, name):
+    self.ops.append(("delete-node-prop", node_baton[0], node_baton[1], name))
+  def apply_textdelta(self, node_baton):
+    self.ops.append(("apply-textdelta", node_baton[0], node_baton[1]))
+    return None
+  def set_fulltext(self, node_baton):
+    self.ops.append(("set-fulltext", node_baton[0], node_baton[1]))
+    return None
+
+
 def _authz_callback(root, path, pool):
   "A dummy authz callback which always returns success."
   return 1
@@ -139,6 +175,62 @@ class SubversionRepositoryTestCase(unitt
     #        svn_repos_t objects, so the following call segfaults
     #repos.dump_fs2(None, None, None, 0, self.rev, 0, 0, None)
 
+  def test_parse_fns3(self):
+    self.cancel_calls = 0
+    def is_cancelled():
+      self.cancel_calls += 1
+      return None
+    dump_path = os.path.join(os.path.dirname(sys.argv[0]),
+        "trac/versioncontrol/tests/svnrepos.dump")
+    stream = open(dump_path)
+    dsp = DumpStreamParser()
+    ptr, baton = repos.make_parse_fns3(dsp)
+    repos.parse_dumpstream3(stream, ptr, baton, False, is_cancelled)
+    stream.close()
+    self.assertEqual(self.cancel_calls, 76)
+    expected_list = [
+        ("magic-header", 2),
+        ('uuid', '92ea810a-adf3-0310-b540-bef912dcf5ba'),
+        ('new-revision', 0),
+        ('set-revision-prop', 0, 'svn:date', '2005-04-01T09:57:41.312767Z'),
+        ('close-revision', 0),
+        ('new-revision', 1),
+        ('set-revision-prop', 1, 'svn:log', 'Initial directory layout.'),
+        ('set-revision-prop', 1, 'svn:author', 'john'),
+        ('set-revision-prop', 1, 'svn:date', '2005-04-01T10:00:52.353248Z'),
+        ('new-node', 1, 'branches'),
+        ('remove-node-props', 1, 'branches'),
+        ('close-node', 1, 'branches'),
+        ('new-node', 1, 'tags'),
+        ('remove-node-props', 1, 'tags'),
+        ('close-node', 1, 'tags'),
+        ('new-node', 1, 'trunk'),
+        ('remove-node-props', 1, 'trunk'),
+        ('close-node', 1, 'trunk'),
+        ('close-revision', 1),
+        ('new-revision', 2),
+        ('set-revision-prop', 2, 'svn:log', 'Added README.'),
+        ('set-revision-prop', 2, 'svn:author', 'john'),
+        ('set-revision-prop', 2, 'svn:date', '2005-04-01T13:12:18.216267Z'),
+        ('new-node', 2, 'trunk/README.txt'),
+        ('remove-node-props', 2, 'trunk/README.txt'),
+        ('set-fulltext', 2, 'trunk/README.txt'),
+        ('close-node', 2, 'trunk/README.txt'),
+        ('close-revision', 2), ('new-revision', 3),
+        ('set-revision-prop', 3, 'svn:log', 'Fixed README.\n'),
+        ('set-revision-prop', 3, 'svn:author', 'kate'),
+        ('set-revision-prop', 3, 'svn:date', '2005-04-01T13:24:58.234643Z'),
+        ('new-node', 3, 'trunk/README.txt'),
+        ('remove-node-props', 3, 'trunk/README.txt'),
+        ('set-node-prop', 3, 'trunk/README.txt', 'svn:mime-type', 'text/plain'),
+        ('set-node-prop', 3, 'trunk/README.txt', 'svn:eol-style', 'native'),
+        ('set-fulltext', 3, 'trunk/README.txt'),
+        ('close-node', 3, 'trunk/README.txt'), ('close-revision', 3),
+        ]
+    # Compare only the first X nodes described in the expected list - otherwise
+    # the comparison list gets too long.
+    self.assertEqual(dsp.ops[:len(expected_list)], expected_list)
+
   def test_get_logs(self):
     """Test scope of get_logs callbacks"""
     logs = []
@@ -177,6 +269,17 @@ class SubversionRepositoryTestCase(unitt
                      set(["This is a test.\n", "A test.\n"]))
     self.assertEqual(len(editor.textdeltas), 2)
 
+  def test_unnamed_editor(self):
+      """Test editor object without reference from interpreter"""
+      # Check that the delta.Editor object has proper lifetime. Without
+      # increment of the refcount in make_baton, the object was destroyed
+      # immediately because the interpreter does not hold a reference to it.
+      this_root = fs.revision_root(self.fs, self.rev)
+      prev_root = fs.revision_root(self.fs, self.rev-1)
+      e_ptr, e_baton = delta.make_editor(ChangeReceiver(this_root, prev_root))
+      repos.dir_delta(prev_root, '', '', this_root, '', e_ptr, e_baton,
+              _authz_callback, 1, 1, 0, 0)
+
   def test_retrieve_and_change_rev_prop(self):
     """Test playing with revprops"""
     self.assertEqual(repos.fs_revision_prop(self.repos, self.rev, "svn:log",

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/ruby/test/test_client.rb Mon Feb  9 11:23:39 2015
@@ -2243,8 +2243,8 @@ class SvnClientTest < Test::Unit::TestCa
 
       items = nil
       ctx.cp(path, repos_uri2)
-      assert_equal([nil], items.collect {|item| item.wcprop_changes})
-      assert_equal([nil], items.collect {|item| item.incoming_prop_changes})
+      assert_equal([[]], items.collect {|item| item.wcprop_changes})
+      assert_equal([[]], items.collect {|item| item.incoming_prop_changes})
       assert_equal([nil], items.collect {|item| item.outgoing_prop_changes})
     end
   end

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_client.i
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_client.i?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_client.i Mon Feb  9 11:23:39 2015
@@ -170,13 +170,6 @@
                   svn_swig_rb_get_commit_log_func)
 #endif
 
-#ifdef SWIGRUBY
-%callback_typemap(svn_cancel_func_t cancel_func, void *cancel_baton,
-                  ,
-                  ,
-                  svn_swig_rb_cancel_func)
-#endif
-
 %callback_typemap(svn_client_blame_receiver_t receiver, void *receiver_baton,
                   svn_swig_py_client_blame_receiver_func,
                   svn_swig_pl_blame_func,

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_delta.i?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_delta.i Mon Feb  9 11:23:39 2015
@@ -205,11 +205,11 @@ void _ops_get(int *num_ops, const svn_tx
 %include svn_delta_h.swg
 
 #ifdef SWIGPYTHON
-%pythoncode {
+%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

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_repos.i
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_repos.i?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_repos.i (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/svn_repos.i Mon Feb  9 11:23:39 2015
@@ -147,8 +147,18 @@ svn_error_t *svn_repos_dump_fs2(svn_repo
 %ignore svn_repos_dump_fs2;
 #endif
 
+/* ----------------------------------------------------------------------- */
+#ifdef SWIGPYTHON
+/* Make swig wrap this function for us, to allow making a vtable in python */
+void svn_swig_py_make_parse_fns3(const svn_repos_parse_fns3_t **parse_fns3,
+                                 void **parse_baton,
+                                 PyObject *py_parse_fns3,
+                                 apr_pool_t *pool);
+#endif
+
 %include svn_repos_h.swg
 
 #ifdef SWIGRUBY
 %define_close_related_methods(repos)
 #endif
+

Modified: subversion/branches/remove-log-addressing/subversion/include/mod_dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/mod_dav_svn.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/mod_dav_svn.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/mod_dav_svn.h Mon Feb  9 11:23:39 2015
@@ -40,7 +40,7 @@ extern "C" {
 /**
    Given an apache request @a r, a @a uri, and a @a root_path to the svn
    location block, process @a uri and return many things, allocated in
-   @a r->pool:
+   @a pool:
 
    - @a cleaned_uri:    The uri with duplicate and trailing slashes removed.
 
@@ -74,7 +74,25 @@ extern "C" {
      - @a relative_path:  /!svn/blah/13/A/B/alpha
      - @a repos_path:     A/B/alpha
      - @a trailing_slash: FALSE
+
+   NOTE: The returned dav_error will be also allocated in @a pool, not
+         in @a r->pool.
+
+   @since New in 1.9
 */
+AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri2(request_rec *r,
+                                                  const char *uri_to_split,
+                                                  const char *root_path,
+                                                  const char **cleaned_uri,
+                                                  int *trailing_slash,
+                                                  const char **repos_basename,
+                                                  const char **relative_path,
+                                                  const char **repos_path,
+                                                  apr_pool_t *pool);
+
+/**
+ * Same as dav_svn_split_uri2() but allocates the result in @a r->pool.
+ */
 AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
                                                  const char *uri,
                                                  const char *root_path,
@@ -87,7 +105,22 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_s
 
 /**
  * Given an apache request @a r and a @a root_path to the svn location
- * block, set @a *repos_path to the path of the repository on disk.  */
+ * block, set @a *repos_path to the path of the repository on disk.
+ * Perform all allocations in @a pool.
+ *
+ * NOTE: The returned dav_error will be also allocated in @a pool, not
+ *       in @a r->pool.
+ *
+ * @since New in 1.9
+ */
+AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path2(request_rec *r,
+                                                       const char *root_path,
+                                                       const char **repos_path,
+                                                       apr_pool_t *pool);
+
+/**
+ * Same as dav_svn_get_repos_path2() but allocates the result in@a r->pool.
+ */
 AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
                                                       const char *root_path,
                                                       const char **repos_path);

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_auth_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_auth_private.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_auth_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_auth_private.h Mon Feb  9 11:23:39 2015
@@ -231,6 +231,14 @@ svn_auth__ssl_client_cert_pw_set(svn_boo
                                  svn_boolean_t non_interactive,
                                  apr_pool_t *pool);
 
+/* Apply the specified configuration for connecting with SERVER_NAME
+   to the auth baton */
+svn_error_t *
+svn_auth__apply_config_for_server(svn_auth_baton_t *ab,
+                                  apr_hash_t *config,
+                                  const char *server_name,
+                                  apr_pool_t *scratch_pool);
+
 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
 /**
  * Set @a *provider to an authentication provider that implements

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_fs_util.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_fs_util.h Mon Feb  9 11:23:39 2015
@@ -29,12 +29,17 @@
 
 #include "svn_types.h"
 #include "svn_error.h"
+#include "svn_version.h"
 #include "svn_fs.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
+/* Get libsvn_fs_util version information. */
+const svn_version_t *
+svn_fs_util__version(void);
+
 /* Returns whether PATH is in canonical form as defined by
    svn_fs__canonicalize_abspath().
  */

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_mergeinfo_private.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_mergeinfo_private.h Mon Feb  9 11:23:39 2015
@@ -65,6 +65,27 @@ svn_error_t *
 svn_rangelist__combine_adjacent_ranges(svn_rangelist_t *rangelist,
                                        apr_pool_t *scratch_pool);
 
+/** Canonicalize the @a rangelist: sort the ranges, and combine adjacent or
+ * overlapping ranges into single ranges where possible.
+ *
+ * If overlapping ranges have different inheritability, return an error.
+ *
+ * Modify @a rangelist in place. Use @a scratch_pool for temporary
+ * allocations.
+ */
+svn_error_t *
+svn_rangelist__canonicalize(svn_rangelist_t *rangelist,
+                            apr_pool_t *scratch_pool);
+
+/** Canonicalize the revision range lists in the @a mergeinfo.
+ *
+ * Modify @a mergeinfo in place. Use @a scratch_pool for temporary
+ * allocations.
+ */
+svn_error_t *
+svn_mergeinfo__canonicalize_ranges(svn_mergeinfo_t mergeinfo,
+                                   apr_pool_t *scratch_pool);
+
 /* Set inheritability of all rangelists in MERGEINFO to INHERITABLE.
    If MERGEINFO is NULL do nothing.  If a rangelist in MERGEINFO is
    NULL leave it alone. */

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_ra_private.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_ra_private.h Mon Feb  9 11:23:39 2015
@@ -39,6 +39,33 @@
 extern "C" {
 #endif /* __cplusplus */
 
+
+
+/**
+ * Open a new ra session @a *new_session to the same repository as an existing
+ * ra session @a old_session, copying the callbacks, auth baton, etc. from the
+ * old session. This essentially limits the lifetime of the new, duplicated
+ * session to the lifetime of the old session. If the new session should
+ * outlive the new session, creating a new session using svn_ra_open4() is
+ * recommended.
+ *
+ * If @a session_url is not NULL, parent the new session at session_url. Note
+ * that @a session_url MUST BE in the same repository as @a old_session or an
+ * error will be returned. When @a session_url NULL the same session root
+ * will be used.
+ *
+ * Allocate @a new_session in @a result_pool. Perform temporary allocations
+ * in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_ra__dup_session(svn_ra_session_t **new_session,
+                    svn_ra_session_t *old_session,
+                    const char *session_url,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool);
+
 /* Equivalent to svn_ra__assert_capable_server()
    for SVN_RA_CAPABILITY_MERGEINFO. */
 svn_error_t *

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h Mon Feb  9 11:23:39 2015
@@ -260,6 +260,137 @@ svn_repos__authz_pool_get(svn_authz_t **
 
 /** @} */
 
+/* Adjust mergeinfo paths and revisions in ways that are useful when loading
+ * a dump stream.
+ *
+ * Set *NEW_VALUE_P to an adjusted version of the mergeinfo property value
+ * supplied in OLD_VALUE, with the following adjustments.
+ *
+ *   - Normalize line endings: if all CRLF, change to LF; but error if
+ *     mixed. If this normalization is performed, send a notification type
+ *     svn_repos_notify_load_normalized_mergeinfo to NOTIFY_FUNC/NOTIFY_BATON.
+ *
+ *   - Prefix all the merge source paths with PARENT_DIR, if not null.
+ *
+ *   - Adjust any mergeinfo revisions not older than OLDEST_DUMPSTREAM_REV
+ *     by using REV_MAP which maps (svn_revnum_t) old rev to (svn_revnum_t)
+ *     new rev.
+ *
+ *   - Adjust any mergeinfo revisions older than OLDEST_DUMPSTREAM_REV by
+ *     (-OLDER_REVS_OFFSET), dropping any revisions that become <= 0.
+ *
+ * Allocate *NEW_VALUE_P in RESULT_POOL.
+ */
+svn_error_t *
+svn_repos__adjust_mergeinfo_property(svn_string_t **new_value_p,
+                                     const svn_string_t *old_value,
+                                     const char *parent_dir,
+                                     apr_hash_t *rev_map,
+                                     svn_revnum_t oldest_dumpstream_rev,
+                                     apr_int32_t older_revs_offset,
+                                     svn_repos_notify_func_t notify_func,
+                                     void *notify_baton,
+                                     apr_pool_t *result_pool,
+                                     apr_pool_t *scratch_pool);
+
+/* A header entry.
+ *
+ * (The headers are currently declared here to be of type apr_array_header_t
+ * with svn_repos__dumpfile_header_entry_t entries, but the types could
+ * instead be made opaque.)
+ */
+typedef struct svn_repos__dumpfile_header_entry_t {
+  const char *key, *val;
+} svn_repos__dumpfile_header_entry_t;
+
+/* Create an empty set of headers.
+ */
+apr_array_header_t *
+svn_repos__dumpfile_headers_create(apr_pool_t *pool);
+
+/* Push the header (KEY, VAL) onto HEADERS.
+ *
+ * Duplicate the key and value into HEADERS's pool.
+ */
+void
+svn_repos__dumpfile_header_push(apr_array_header_t *headers,
+                                const char *key,
+                                const char *val);
+
+/* Push the header (KEY, val = VAL_FMT ...) onto HEADERS.
+ *
+ * Duplicate the key and value into HEADERS's pool.
+ */
+void
+svn_repos__dumpfile_header_pushf(apr_array_header_t *headers,
+                                 const char *key,
+                                 const char *val_fmt,
+                                 ...)
+        __attribute__((format(printf, 3, 4)));
+
+/* Write to STREAM the headers in HEADERS followed by a blank line.
+ *
+ * HEADERS is an array of struct {const char *key, *val;}.
+ */
+svn_error_t *
+svn_repos__dump_headers(svn_stream_t *stream,
+                        apr_array_header_t *headers,
+                        svn_boolean_t terminate,
+                        apr_pool_t *scratch_pool);
+
+/* Write a revision record to DUMP_STREAM for revision REVISION with revision
+ * properies REVPROPS, creating appropriate headers.
+ *
+ * Include all of the headers in EXTRA_HEADERS (if non-null), ignoring
+ * the revision number header and the three content length headers (which
+ * will be recreated as needed). EXTRA_HEADERS maps (char *) key to
+ * (char *) value.
+ *
+ * REVPROPS maps (char *) key to (svn_string_t *) value.
+ *
+ * Iff PROPS_SECTION_ALWAYS is true, include a prop content section (and
+ * corresponding header) even when REVPROPS is empty. This option exists
+ * to support a historical difference between svndumpfilter and svnadmin
+ * dump.
+ *
+ * Finally write another blank line.
+ */
+svn_error_t *
+svn_repos__dump_revision_record(svn_stream_t *dump_stream,
+                                svn_revnum_t revision,
+                                apr_hash_t *extra_headers,
+                                apr_hash_t *revprops,
+                                svn_boolean_t props_section_always,
+                                apr_pool_t *scratch_pool);
+
+/* Output node headers and props.
+ *
+ * Output HEADERS, content length headers, blank line, and
+ * then PROPS_STR (if non-null) to DUMP_STREAM.
+ *
+ * HEADERS is an array of headers as struct {const char *key, *val;}.
+ * Write them all in the given order.
+ *
+ * PROPS_STR is the property content block, including a terminating
+ * 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
+ * Prop-content-length header and the prop content block.
+ *
+ * Iff HAS_TEXT is true, write a Text-content length, using the value
+ * TEXT_CONTENT_LENGTH.
+ *
+ * Write a Content-length header, its value being the sum of the
+ * Prop- and Text- content length headers, if props and/or text are present
+ * or if CONTENT_LENGTH_ALWAYS is true.
+ */
+svn_error_t *
+svn_repos__dump_node_record(svn_stream_t *dump_stream,
+                            apr_array_header_t *headers,
+                            svn_stringbuf_t *props_str,
+                            svn_boolean_t has_text,
+                            svn_filesize_t text_content_length,
+                            svn_boolean_t content_length_always,
+                            apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_utf_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_utf_private.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_utf_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_utf_private.h Mon Feb  9 11:23:39 2015
@@ -159,6 +159,23 @@ svn_utf__normalize(const char **result,
 svn_boolean_t
 svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool);
 
+/* Encode an UCS-4 string to UTF-8, placing the result into BUFFER.
+ * While utf8proc does have a similar function, it does more checking
+ * and processing than we want here; this function does not attempt
+ * any normalizations but just encodes the individual code points.
+ * The encoded string will always be NUL-terminated.
+ *
+ * Return the length of the result (excluding the NUL terminator) in
+ * *result_length.
+ *
+ * A returned error indicates that a codepoint is invalid.
+ */
+svn_error_t *
+svn_utf__encode_ucs4_string(svn_membuf_t *buffer,
+                            const apr_int32_t *ucs4str,
+                            apr_size_t length,
+                            apr_size_t *result_length);
+
 /* Pattern matching similar to the the SQLite LIKE and GLOB
  * operators. PATTERN, KEY and ESCAPE must all point to UTF-8
  * strings. Furthermore, ESCAPE, if provided, must be a character from
@@ -191,6 +208,48 @@ svn_utf__glob(svn_boolean_t *match,
 const char *
 svn_utf__utf8proc_version(void);
 
+/* Convert an UTF-16 (or UCS-2) string to UTF-8, returning the pointer
+ * in RESULT. If BIG_ENDIAN is set, then UTF16STR is big-endian;
+ * otherwise, it's little-endian.
+ *
+ * If UTF16LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF16STR must be
+ * terminated with a zero; otherwise, it is the number of 16-bit codes
+ * to convert, and the source string may contain NUL values.
+ *
+ * Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
+ * intermediate allocation.
+ *
+ * This function combines UTF-16 surrogate pairs into single code
+ * points, but will leave single lead or trail surrogates unchanged.
+ */
+svn_error_t *
+svn_utf__utf16_to_utf8(const svn_string_t **result,
+                       const apr_uint16_t *utf16str,
+                       apr_size_t utf16len,
+                       svn_boolean_t big_endian,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+/* Convert an UTF-32 string to UTF-8, returning the pointer in
+ * RESULT. If BIG_ENDIAN is set, then UTF32STR is big-endian;
+ * otherwise, it's little-endian.
+ *
+ * If UTF32LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF32STR must be
+ * terminated with a zero; otherwise, it is the number of 32-bit codes
+ * to convert, and the source string may contain NUL values.
+ *
+ * Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
+ * intermediate allocation.
+ */
+svn_error_t *
+svn_utf__utf32_to_utf8(const svn_string_t **result,
+                       const apr_int32_t *utf32str,
+                       apr_size_t utf32len,
+                       svn_boolean_t big_endian,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_client.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_client.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_client.h Mon Feb  9 11:23:39 2015
@@ -465,13 +465,19 @@ typedef struct svn_client_commit_item3_t
 {
   /* IMPORTANT: If you extend this structure, add new fields to the end. */
 
-  /** absolute working-copy path of item */
+  /** absolute working-copy path of item. Always set during normal commits
+   * (and copies from a working copy) to the repository. Can only be NULL
+   * when stub commit items are created for operations that only involve
+   * direct repository operations. During WC->REPOS copy operations, this
+   * path is the WC source path of the operation. */
   const char *path;
 
   /** node kind (dir, file) */
   svn_node_kind_t kind;
 
-  /** commit URL for this item */
+  /** commit URL for this item. Points to the repository location of PATH
+   * during commits, or to the final URL of the item when copying from the
+   * working copy to the repository. */
   const char *url;
 
   /** revision of textbase */
@@ -1014,11 +1020,6 @@ typedef struct svn_client_ctx_t
    * @since New in 1.7.  */
   svn_wc_context_t *wc_ctx;
 
-  /** Total number of bytes transferred over network.
-   *
-   * @since New in 1.9. */
-  apr_off_t progress;
-
   /** Check-tunnel callback
    *
    * If not @c NULL, and open_tunnel_func is also not @c NULL, this
@@ -4288,6 +4289,10 @@ svn_client_relocate(const char *dir,
  * If @a clear_changelists is TRUE, then changelist information for the
  * paths is cleared while reverting.
  *
+ * If @a metadata_only is TRUE, the files and directories aren't changed
+ * by the operation. If there are conflict marker files attached to the
+ * targets these are removed.
+ *
  * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
  * the reverted item.
@@ -4303,11 +4308,12 @@ svn_client_revert3(const apr_array_heade
                    svn_depth_t depth,
                    const apr_array_header_t *changelists,
                    svn_boolean_t clear_changelists,
+                   svn_boolean_t metadata_only,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool);
 
 /** Similar to svn_client_revert2, but with @a clear_changelists set to
- * FALSE.
+ * FALSE and @a metadata_only set to FALSE.
  *
  * @since New in 1.5.
  * @deprecated Provided for backwards compatibility with the 1.8 API.

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_config.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_config.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_config.h Mon Feb  9 11:23:39 2015
@@ -731,31 +731,6 @@ svn_config_ensure(const char *config_dir
  */
 #define SVN_CONFIG_AUTHN_FAILURES_KEY           "failures"
 
-/** A hash-key for a hostname, such as hostnames in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_HOSTNAME_KEY           "hostname"
-
-/** A hash-key for a fingerprint, such as fingerprints in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_FINGERPRINT_KEY        "fingerprint"
-
-/** A hash-key for a valid-from date, such as dates in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_VALID_FROM_KEY         "valid_from"
-
-/** A hash-key for a valid-to date, such as dates in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_VALID_UNTIL_KEY        "valid_until"
-
-/** A hash-key for an issuer distinguished name, such as issuer names
- * in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_ISSUER_DN_KEY        "issuer_dn"
 
 /** @} */
 

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_diff.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_diff.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_diff.h Mon Feb  9 11:23:39 2015
@@ -475,6 +475,7 @@ typedef struct svn_diff_file_options_t
     * of the nearest preceding line that starts with a character that might be
     * the initial character of a C language identifier.  The default is
     * @c FALSE.
+    * @since New in 1.5.
     */
   svn_boolean_t show_c_function;
 

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h Mon Feb  9 11:23:39 2015
@@ -150,6 +150,8 @@ extern "C" {
                                          + (22 * SVN_ERR_CATEGORY_SIZE))
 #define SVN_ERR_MALFUNC_CATEGORY_START  (APR_OS_START_USERERR \
                                          + (23 * SVN_ERR_CATEGORY_SIZE))
+#define SVN_ERR_X509_CATEGORY_START     (APR_OS_START_USERERR \
+                                         + (24 * SVN_ERR_CATEGORY_SIZE))
 
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
@@ -1617,6 +1619,90 @@ SVN_ERROR_START
              SVN_ERR_MALFUNC_CATEGORY_START + 1,
              "No non-tracing links found in the error chain")
 
+  /* X509 parser errors.
+   * Names of these error codes are based on tropicssl error codes.
+   * @since New in 1.9 */
+
+  SVN_ERRDEF(SVN_ERR_ASN1_OUT_OF_DATA,
+             SVN_ERR_X509_CATEGORY_START + 0,
+             "Unexpected end of ASN1 data")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_UNEXPECTED_TAG,
+             SVN_ERR_X509_CATEGORY_START + 1,
+             "Unexpected ASN1 tag")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_INVALID_LENGTH,
+             SVN_ERR_X509_CATEGORY_START + 2,
+             "Invalid ASN1 length")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_LENGTH_MISMATCH,
+             SVN_ERR_X509_CATEGORY_START + 3,
+             "ASN1 length mismatch")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_INVALID_DATA,
+             SVN_ERR_X509_CATEGORY_START + 4,
+             "Invalid ASN1 data")
+
+  SVN_ERRDEF(SVN_ERR_X509_FEATURE_UNAVAILABLE,
+             SVN_ERR_X509_CATEGORY_START + 5,
+             "Unavailable X509 feature")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PEM,
+             SVN_ERR_X509_CATEGORY_START + 6,
+             "Invalid PEM certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_FORMAT,
+             SVN_ERR_X509_CATEGORY_START + 7,
+             "Invalid certificate format")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_VERSION,
+             SVN_ERR_X509_CATEGORY_START + 8,
+             "Invalid certificate version")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SERIAL,
+             SVN_ERR_X509_CATEGORY_START + 9,
+             "Invalid certificate serial number")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_ALG,
+             SVN_ERR_X509_CATEGORY_START + 10,
+             "Found invalid algorithm in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_NAME,
+             SVN_ERR_X509_CATEGORY_START + 11,
+             "Found invalid name in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_DATE,
+             SVN_ERR_X509_CATEGORY_START + 12,
+             "Found invalid date in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PUBKEY,
+             SVN_ERR_X509_CATEGORY_START + 13,
+             "Found invalid public key in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SIGNATURE,
+             SVN_ERR_X509_CATEGORY_START + 14,
+             "Found invalid signature in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_EXTENSIONS,
+             SVN_ERR_X509_CATEGORY_START + 15,
+             "Found invalid extensions in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_VERSION,
+             SVN_ERR_X509_CATEGORY_START + 16,
+             "Unknown certificate version")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_PK_ALG,
+             SVN_ERR_X509_CATEGORY_START + 17,
+             "Certificate uses unknown public key algorithm")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_SIG_MISMATCH,
+             SVN_ERR_X509_CATEGORY_START + 18,
+             "Certificate signature mismatch")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_VERIFY_FAILED,
+             SVN_ERR_X509_CATEGORY_START + 19,
+             "Certficate verification failed")
+
 SVN_ERROR_END
 
 

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_fs.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_fs.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_fs.h Mon Feb  9 11:23:39 2015
@@ -2791,7 +2791,7 @@ svn_fs_unlock(svn_fs_t *fs,
 /** If @a path is locked in @a fs, set @a *lock to an svn_lock_t which
  *  represents the lock, allocated in @a pool.
  *
- * If @a path is not locked, set @a *lock to NULL.
+ * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
  */
 svn_error_t *
 svn_fs_get_lock(svn_lock_t **lock,

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_io.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_io.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_io.h Mon Feb  9 11:23:39 2015
@@ -682,28 +682,48 @@ svn_io_files_contents_three_same_p(svn_b
                                    const char *file3,
                                    apr_pool_t *scratch_pool);
 
-/** Create file at utf8-encoded @a file with contents @a contents.
- * @a file must not already exist.
+/** Create a file at utf8-encoded path @a file with the contents given
+ * by the null-terminated string @a contents.
+ *
+ * @a file must not already exist. If an error occurs while writing or
+ * closing the file, attempt to delete the file before returning the error.
+ *
+ * Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a contents
+ * is null, create an empty file.
+ *
  * Use @a pool for memory allocations.
+ *
+ * @since 
  */
 svn_error_t *
 svn_io_file_create(const char *file,
                    const char *contents,
                    apr_pool_t *pool);
 
-/** Create file at utf8-encoded @a file with binary contents @a contents
- * of @a length bytes.  @a file must not already exist.
+/** Create a file at utf8-encoded path @a file with the contents given
+ * by @a contents of @a length bytes.
+ *
+ * @a file must not already exist. If an error occurs while writing or
+ * closing the file, attempt to delete the file before returning the error.
+ *
+ * Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a length is
+ * zero, create an empty file; in this case @a contents may be null.
+ *
  * Use @a pool for memory allocations.
  *
  * @since New in 1.9.
  */
 svn_error_t *
-svn_io_file_create_binary(const char *file,
-                          const char *contents,
-                          apr_size_t length,
-                          apr_pool_t *pool);
+svn_io_file_create_bytes(const char *file,
+                         const void *contents,
+                         apr_size_t length,
+                         apr_pool_t *pool);
 
-/** Create empty file at utf8-encoded @a file, which must not already exist.
+/** Create an empty file at utf8-encoded path @a file.
+ * 
+ * @a file must not already exist. If an error occurs while
+ * closing the file, attempt to delete the file before returning the error.
+ *
  * Use @a pool for memory allocations.
  *
  * @since New in 1.9.

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_ra.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_ra.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_ra.h Mon Feb  9 11:23:39 2015
@@ -785,32 +785,6 @@ svn_ra_open(svn_ra_session_t **session_p
             apr_hash_t *config,
             apr_pool_t *pool);
 
-/**
- * Open a new ra session @a *new_session to the same repository as an existing
- * ra session @a old_session, copying the callbacks, auth baton, etc. from the
- * old session. This essentially limits the lifetime of the new, duplicated
- * session to the lifetime of the old session. If the new session should
- * outlive the new session, creating a new session using svn_ra_open4() is
- * recommended.
- *
- * If @a session_url is not NULL, parent the new session at session_url. Note
- * that @a session_url MUST BE in the same repository as @a old_session or an
- * error will be returned. When @a session_url NULL the same session root
- * will be used.
- *
- * Allocate @a new_session in @a result_pool. Perform temporary allocations
- * in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_ra_dup_session(svn_ra_session_t **new_session,
-                   svn_ra_session_t *old_session,
-                   const char *session_url,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool);
-
-
 /** Change the root URL of an open @a ra_session to point to a new path in the
  * same repository.  @a url is the new root URL.  Use @a pool for
  * temporary allocations.
@@ -1011,6 +985,10 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
  * Use @a pool for memory allocation.
  *
  * @since New in 1.5.
+ *
+ * @note Like most commit editors, the returned editor requires that the
+ * @c copyfrom_path parameter passed to its @c add_file and @c add_directory
+ * methods is a URL, not a relative path.
  */
 svn_error_t *
 svn_ra_get_commit_editor3(svn_ra_session_t *session,
@@ -1928,8 +1906,12 @@ svn_ra_unlock(svn_ra_session_t *session,
 
 /**
  * If @a path is locked, set @a *lock to an svn_lock_t which
- * represents the lock, allocated in @a pool.  If @a path is not
- * locked, set @a *lock to NULL.
+ * represents the lock, allocated in @a pool.
+ *
+ * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
+ *
+ * @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
+ * when @a path didn't exist in HEAD on specific ra layers.
  *
  * @since New in 1.2.
  */

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_ra_svn.h?rev=1658362&r1=1658361&r2=1658362&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_ra_svn.h Mon Feb  9 11:23:39 2015
@@ -287,6 +287,12 @@ svn_ra_svn_conn_remote_host(svn_ra_svn_c
  *
  * Upon successful completion of the edit, the editor will invoke @a callback
  * with @a callback_baton as an argument.
+ *
+ * @note The @c copyfrom_path parameter passed to the @c add_file and
+ * @c add_directory methods of the returned editor may be either a URL or a
+ * relative path, and is transferred verbatim to the receiving end of the
+ * connection. See svn_ra_svn_drive_editor2() for information on the
+ * receiving end of the connection.
  */
 void
 svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
@@ -302,6 +308,13 @@ svn_ra_svn_get_editor(const svn_delta_ed
  * if @a for_replay is TRUE.
  *
  * @since New in 1.4.
+ *
+ * @note The @c copyfrom_path parameter passed to the @c add_file and
+ * @c add_directory methods of the receiving editor will be canonicalized
+ * either as a URL or as a relative path (starting with a slash) according
+ * to which kind was sent by the driving end of the connection. See
+ * svn_ra_svn_get_editor() for information on the driving end of the
+ * connection.
  */
 svn_error_t *
 svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,



Mime
View raw message