You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/03/06 18:50:31 UTC

svn commit: r1297604 [2/12] - in /subversion/branches/reintegrate-keep-alive: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ notes/ notes/api-errata/1.7/ subversion/bindings/javahl/native/ subversion/bindings/javahl...

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/include/svn_types.swg?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/include/svn_types.swg Tue Mar  6 17:50:23 2012
@@ -101,6 +101,8 @@
   svn_auth_provider_object_t **,
   svn_config_t **,
   svn_diff_t **,
+  svn_patch_file_t **,
+  svn_patch_t **,
   void **credentials,
   void **iter_baton,
   void **token,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Tue Mar  6 17:50:23 2012
@@ -984,6 +984,34 @@ svn_error_t *svn_ra_make_callbacks(svn_r
     return SVN_NO_ERROR;
 }
 
+svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
+                                                           const char *keyring_name,
+                                                           void *baton,
+                                                           apr_pool_t *pool)
+{
+    SV *result;
+    STRLEN len;
+    /* The baton is the actual prompt function passed from perl, so we
+     * call that one and process the result. */
+    svn_swig_pl_callback_thunk(CALL_SV,
+                               baton, &result,
+                               "sS", keyring_name,
+                               pool, POOLINFO);
+    if (!SvOK(result) || result == &PL_sv_undef) {
+        *keyring_password = NULL;
+    }
+    else if (SvPOK(result)) {
+        *keyring_password = apr_pstrdup(pool, SvPV(result, len));
+    }
+    else {
+        SvREFCNT_dec(result);
+        croak("not a string");
+    }
+
+    SvREFCNT_dec(result);
+    return SVN_NO_ERROR;
+}
+
 svn_error_t *svn_swig_pl_thunk_simple_prompt(svn_auth_cred_simple_t **cred,
                                              void *baton,
                                              const char *realm,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h Tue Mar  6 17:50:23 2012
@@ -144,6 +144,11 @@ svn_error_t *svn_ra_make_callbacks(svn_r
 				   SV *perl_callbacks,
 				   apr_pool_t *pool);
 
+/* thunked gnome_keyring_unlock_prompt callback function */
+svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
+                                                           const char *keyring_name,
+                                                           void *baton,
+                                                           apr_pool_t *pool);
 /* thunked simple_prompt callback function */
 svn_error_t *svn_swig_pl_thunk_simple_prompt(svn_auth_cred_simple_t **cred,
                                              void *baton,

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Base.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Client.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Core.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Delta.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Fs.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Ra.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Repos.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/Wc.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/0use.t
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/1repos.t
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/2fs.t
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/3client.t?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/3client.t Tue Mar  6 17:50:23 2012
@@ -20,7 +20,7 @@
 #
 #
 
-use Test::More tests => 119;
+use Test::More tests => 121;
 use strict;
 
 # shut up about variables that are only used once.
@@ -46,6 +46,11 @@ my $reposurl = 'file://' . (substr($repo
 my $wcpath = catdir($testpath,'wc');
 my $importpath = catdir($testpath,'import');
 
+# Use internal style paths on Windows
+$reposurl =~ s/\\/\//g;
+$wcpath =~ s/\\/\//g;
+$importpath =~ s/\\/\//g;
+
 # track current rev ourselves to test against
 my $current_rev = 0;
 
@@ -53,7 +58,7 @@ my $current_rev = 0;
 $SVN::Error::handler = undef;
 
 # Get username we are running as
-my $username = getpwuid($>);
+my $username = getlogin() || getpwuid($>);
 
 # This is ugly to create the test repo with SVN::Repos, but
 # it seems to be the most reliable way.
@@ -86,36 +91,32 @@ my ($rpgval,$rpgrev) = $ctx->revprop_get
 is($rpgval,$username,'svn:author set to expected username from revprop_get');
 is($rpgrev,$current_rev,'Returned revnum of current rev from revprop_get');
 
-SKIP: {
-    skip 'Difficult to test on Win32', 3 if $^O eq 'MSWin32';
-
+if ($^O eq 'MSWin32') {
+    ok(open(NEW, ">$repospath/hooks/pre-revprop-change.bat"),
+       'Open pre-revprop-change hook for writing');
+    ok(print(NEW 'exit 0'), 'Print to hook');
+    ok(close(NEW), 'Close hook');
+} else {
     ok(rename("$repospath/hooks/pre-revprop-change.tmpl",
               "$repospath/hooks/pre-revprop-change"),
        'Rename pre-revprop-change hook');
     ok(chmod(0700,"$repospath/hooks/pre-revprop-change"),
        'Change permissions on pre-revprop-change hook');
-
-    my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
-                                      $reposurl, $current_rev, 0);
-    is($rps_rev,$current_rev,
-       'Returned revnum of current rev from revprop_set');
-
+    is(1, 1, '-')
 }
+my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
+                                  $reposurl, $current_rev, 0);
+is($rps_rev,$current_rev,
+   'Returned revnum of current rev from revprop_set');
 
 my ($rph, $rplrev) = $ctx->revprop_list($reposurl,$current_rev);
 isa_ok($rph,'HASH','Returned hash reference form revprop_list');
 is($rplrev,$current_rev,'Returned current rev from revprop_list');
 is($rph->{'svn:author'},$username,
    'svn:author is expected user from revprop_list');
-if ($^O eq 'MSWin32') {
-    # we skip the log change test on win32 so we have to test
-    # for a different var here
-    is($rph->{'svn:log'},'Make dir1',
-       'svn:log is expected value from revprop_list');
-} else {
-    is($rph->{'svn:log'},'mkdir dir1',
-       'svn:log is expected value from revprop_list');
-}
+is($rph->{'svn:log'},'mkdir dir1',
+   'svn:log is expected value from revprop_list');
+
 ok($rph->{'svn:date'},'svn:date is set from revprop_list');
 
 is($ctx->checkout($reposurl,$wcpath,'HEAD',1),$current_rev,
@@ -477,6 +478,28 @@ foreach my $p (@providers) {
 }
 ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s');
 
+SKIP: {
+  skip 'Gnome-Keyring support not compiled in', 1
+      unless defined &SVN::Core::auth_set_gnome_keyring_unlock_prompt_func;
+
+  # Test setting gnome_keyring prompt function. This just sets the proper
+  # attributes in the auth baton and checks the return value (which should
+  # be a reference to the passed function reference). This does not
+  # actually try the prompt, since that would require setting up a
+  # gnome-keyring-daemon...
+  sub gnome_keyring_unlock_prompt {
+      my $keyring_name = shift;
+      my $pool = shift;
+
+      'test';
+  }
+
+  my $callback = \&gnome_keyring_unlock_prompt;
+  my $result = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
+                   $ctx->auth(), $callback);
+  is(${$result}, $callback, 'auth_set_gnome_keyring_unlock_prompt_func result equals paramter');
+}
+
 END {
 diag('cleanup');
 rmtree($testpath);

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/3client.t
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/4pool.t
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/5delta-compat.t
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/perl/native/t/5delta.t
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Tue Mar  6 17:50:23 2012
@@ -650,7 +650,7 @@ PyObject *svn_swig_py_stringhash_to_dict
   return convert_hash(hash, convert_string, NULL, NULL);
 }
 
-static PyObject *convert_rangelist(void *value, void *ctx, PyObject *py_pool)
+static PyObject *convert_pointerlist(void *value, void *ctx, PyObject *py_pool)
 {
   int i;
   PyObject *list;
@@ -662,11 +662,11 @@ static PyObject *convert_rangelist(void 
 
   for (i = 0; i < array->nelts; i++)
     {
-      svn_merge_range_t *range = APR_ARRAY_IDX(array, i, svn_merge_range_t *);
+      void *ptr = APR_ARRAY_IDX(array, i, void *);
       PyObject *obj;
       int result;
 
-      obj = convert_to_swigtype(range, ctx, py_pool);
+      obj = convert_to_swigtype(ptr, ctx, py_pool);
       if (obj == NULL)
         goto error;
 
@@ -681,18 +681,18 @@ static PyObject *convert_rangelist(void 
   return NULL;
 }
 
-PyObject *svn_swig_py_rangelist_to_list(apr_array_header_t *rangelist,
-                                        swig_type_info *type,
-                                        PyObject *py_pool)
+PyObject *svn_swig_py_pointerlist_to_list(apr_array_header_t *list,
+                                          swig_type_info *type,
+                                          PyObject *py_pool)
 {
-  return convert_rangelist(rangelist, type, py_pool);
+  return convert_pointerlist(list, type, py_pool);
 }
 
 PyObject *svn_swig_py_mergeinfo_to_dict(apr_hash_t *hash,
                                         swig_type_info *type,
                                         PyObject *py_pool)
 {
-  return convert_hash(hash, convert_rangelist, type, py_pool);
+  return convert_hash(hash, convert_pointerlist, type, py_pool);
 }
 
 static PyObject *convert_mergeinfo_hash(void *value, void *ctx,
@@ -2804,6 +2804,41 @@ svn_error_t *svn_swig_py_changelist_rece
 }
 
 svn_error_t *
+svn_swig_py_auth_gnome_keyring_unlock_prompt_func(char **keyring_passwd,
+                                                  const char *keyring_name,
+                                                  void *baton,
+                                                  apr_pool_t *pool)
+{
+  /* The baton is the actual prompt function passed from python */
+  PyObject *function = baton;
+  PyObject *result;
+  svn_error_t *err = SVN_NO_ERROR;
+  *keyring_passwd = NULL;
+
+  if ((function == NULL) || (function == Py_None))
+    return SVN_NO_ERROR;
+
+  svn_swig_py_acquire_py_lock();
+
+  if ((result = PyObject_CallFunction(function,
+                                      (char *)"sO&",
+                                      keyring_name,
+                                      make_ob_pool, pool)) == NULL)
+    {
+      err = callback_exception_error();
+    }
+  else
+    {
+      *keyring_passwd = make_string_from_ob(result, pool);
+      Py_DECREF(result);
+    }
+
+  svn_swig_py_release_py_lock();
+  return err;
+}
+
+
+svn_error_t *
 svn_swig_py_auth_simple_prompt_func(svn_auth_cred_simple_t **cred,
                                     void *baton,
                                     const char *realm,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Tue Mar  6 17:50:23 2012
@@ -135,9 +135,9 @@ PyObject *svn_swig_py_locationhash_to_di
 /* helper function to convert an apr_array_header_t* (of
    svn_merge_range_t *) to a Python list */
 SVN_SWIG_SWIGUTIL_EXPORT
-PyObject *svn_swig_py_rangelist_to_list(apr_array_header_t *rangelist,
-                                        swig_type_info *type,
-                                        PyObject *py_pool);
+PyObject *svn_swig_py_pointerlist_to_list(apr_array_header_t *list,
+                                          swig_type_info *type,
+                                          PyObject *py_pool);
 
 /* helper function to convert an apr_hash_t* (const char *->array of
    svn_merge_range_t *) to a Python dict */
@@ -423,6 +423,13 @@ svn_error_t *svn_swig_py_changelist_rece
 
 /* auth provider callbacks */
 SVN_SWIG_SWIGUTIL_EXPORT
+svn_error_t * svn_swig_py_auth_gnome_keyring_unlock_prompt_func(
+        char **keyring_passwd,
+        const char *keyring_name,
+        void *baton,
+        apr_pool_t *pool);
+
+SVN_SWIG_SWIGUTIL_EXPORT
 svn_error_t *svn_swig_py_auth_simple_prompt_func(
     svn_auth_cred_simple_t **cred,
     void *baton,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/svn/repos.py
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/svn/repos.py?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/svn/repos.py (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/svn/repos.py Tue Mar  6 17:50:23 2012
@@ -88,7 +88,7 @@ class ChangeCollector(_svndelta.Editor):
 
     At this time, two ChangedPath objects will be passed for a path that had
     been replaced in the revision/transaction.  This may change in the future.
-  
+
     ### Can't we deduce FS_PTR from ROOT?
 
     ### POOL is unused

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/client.py
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/client.py?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/client.py (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/client.py Tue Mar  6 17:50:23 2012
@@ -374,6 +374,29 @@ class SubversionClientTestCase(unittest.
 
     self.assertEqual(readme_text, 'This is a test.\n')
 
+  def test_platform_providers(self):
+    providers = core.svn_auth_get_platform_specific_client_providers(None, None)
+    # Not much more we can test in this minimal environment.
+    self.assert_(isinstance(providers, list))
+    self.assert_(not filter(lambda x:
+                             not isinstance(x, core.svn_auth_provider_object_t),
+                            providers))
+
+  def testGnomeKeyring(self):
+    if not hasattr(core, 'svn_auth_set_gnome_keyring_unlock_prompt_func'):
+      # gnome-keying not compiled in, do nothing
+      return
+
+    # This tests setting the gnome-keyring unlock prompt function as an
+    # auth baton parameter. It doesn't actually call gnome-keyring
+    # stuff, since that would require having a gnome-keyring running. We
+    # just test if this doesn't error out, there's not even a return
+    # value to test.
+    def prompt_func(realm_string, pool):
+      return "Foo"
+
+    core.svn_auth_set_gnome_keyring_unlock_prompt_func(self.client_ctx.auth_baton, prompt_func)
+
 def suite():
     return unittest.defaultTestLoader.loadTestsFromTestCase(
       SubversionClientTestCase)

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/repository.py?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/repository.py Tue Mar  6 17:50:23 2012
@@ -170,9 +170,11 @@ class SubversionRepositoryTestCase(unitt
     repos.dir_delta(prev_root, '', '', this_root, '', e_ptr, e_baton,
                     _authz_callback, 1, 1, 0, 0)
 
-    # Check results
-    self.assertEqual(editor.textdeltas[0].new_data, "This is a test.\n")
-    self.assertEqual(editor.textdeltas[1].new_data, "A test.\n")
+    # Check results.
+    # Ignore the order in which the editor delivers the two sibling files.
+    self.assertEqual(set([editor.textdeltas[0].new_data,
+                          editor.textdeltas[1].new_data]),
+                     set(["This is a test.\n", "A test.\n"]))
     self.assertEqual(len(editor.textdeltas), 2)
 
   def test_retrieve_and_change_rev_prop(self):

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py Tue Mar  6 17:50:23 2012
@@ -264,30 +264,50 @@ class SubversionRepositoryTestCase(unitt
 
     def test_diff_dir_different_revs(self):
         diffs = self.repos.get_deltas('trunk', 4, 'trunk', 8)
-        self._cmp_diff((None, ('trunk/dir1/dir2', 8),
-                        (Node.DIRECTORY, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('trunk/dir1/dir3', 8),
-                        (Node.DIRECTORY, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('trunk/README2.txt', 6),
-                        (Node.FILE, Changeset.ADD)), diffs.next())
-        self._cmp_diff((('trunk/dir2', 4), None,
-                        (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
-        self._cmp_diff((('trunk/dir3', 4), None,
-                        (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
+        expected = [
+          (None, ('trunk/README2.txt', 6),
+           (Node.FILE, Changeset.ADD)),
+          (None, ('trunk/dir1/dir2', 8),
+           (Node.DIRECTORY, Changeset.ADD)),
+          (None, ('trunk/dir1/dir3', 8),
+           (Node.DIRECTORY, Changeset.ADD)),
+          (('trunk/dir2', 4), None,
+           (Node.DIRECTORY, Changeset.DELETE)),
+          (('trunk/dir3', 4), None,
+           (Node.DIRECTORY, Changeset.DELETE)),
+        ]
+        actual = [diffs.next() for i in range(5)]
+        actual = sorted(actual,
+                        key=lambda diff: ((diff[0] or diff[1]).path,
+                                          (diff[0] or diff[1]).rev))
+        self.assertEqual(len(expected), len(actual))
+        for e,a in zip(expected, actual):
+          self._cmp_diff(e,a)
         self.assertRaises(StopIteration, diffs.next)
 
     def test_diff_dir_different_dirs(self):
         diffs = self.repos.get_deltas('trunk', 1, 'branches/v1x', 12)
-        self._cmp_diff((None, ('branches/v1x/dir1', 12),
-                        (Node.DIRECTORY, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('branches/v1x/dir1/dir2', 12),
-                        (Node.DIRECTORY, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('branches/v1x/dir1/dir3', 12),
-                        (Node.DIRECTORY, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('branches/v1x/README.txt', 12),
-                        (Node.FILE, Changeset.ADD)), diffs.next())
-        self._cmp_diff((None, ('branches/v1x/README2.txt', 12),
-                        (Node.FILE, Changeset.ADD)), diffs.next())
+        expected = [
+          (None, ('branches/v1x/README.txt', 12),
+           (Node.FILE, Changeset.ADD)),
+          (None, ('branches/v1x/README2.txt', 12),
+           (Node.FILE, Changeset.ADD)),
+          (None, ('branches/v1x/dir1', 12),
+           (Node.DIRECTORY, Changeset.ADD)),
+          (None, ('branches/v1x/dir1/dir2', 12),
+           (Node.DIRECTORY, Changeset.ADD)),
+          (None, ('branches/v1x/dir1/dir3', 12),
+           (Node.DIRECTORY, Changeset.ADD)),
+        ]
+        actual = [diffs.next() for i in range(5)]
+        actual = sorted(actual, key=lambda diff: (diff[1].path, diff[1].rev))
+        # for e,a in zip(expected, actual):
+        #   t.write("%r\n" % (e,))
+        #   t.write("%r\n" % ((None, (a[1].path, a[1].rev), (a[2], a[3])),) )
+        #   t.write('\n')
+        self.assertEqual(len(expected), len(actual))
+        for e,a in zip(expected, actual):
+          self._cmp_diff(e,a)
         self.assertRaises(StopIteration, diffs.next)
 
     def test_diff_dir_no_change(self):

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/wc.py?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/wc.py (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/python/tests/wc.py Tue Mar  6 17:50:23 2012
@@ -216,8 +216,9 @@ class SubversionWorkingCopyTestCase(unit
 
   def test_entries_read(self):
       entries = wc.entries_read(self.wc, True)
-
-      self.assertEqual(['', 'tags', 'branches', 'trunk'], list(entries.keys()))
+      keys = list(entries.keys())
+      keys.sort()
+      self.assertEqual(['', 'branches', 'tags', 'trunk'], keys)
 
   def test_get_ignores(self):
       self.assert_(isinstance(wc.get_ignores(None, self.wc), list))

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Tue Mar  6 17:50:23 2012
@@ -1313,6 +1313,9 @@ DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swi
 DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swig_rb_apr_array_to_array_merge_range,
                           c2r_merge_range_dup, EMPTY_CPP_ARGUMENT,
                           svn_merge_range_t *, NULL)
+DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swig_rb_apr_array_to_array_auth_provider_object,
+                          c2r_swig_type, EMPTY_CPP_ARGUMENT,
+                          svn_auth_provider_object_t *, "svn_auth_provider_object_t*")
 
 static VALUE
 c2r_merge_range_array(void *value, void *ctx)
@@ -2960,6 +2963,41 @@ svn_swig_rb_auth_simple_prompt_func(svn_
 }
 
 svn_error_t *
+svn_swig_rb_auth_gnome_keyring_unlock_prompt_func(char **keyring_passwd,
+                                                  const char *keyring_name,
+                                                  void *baton,
+                                                  apr_pool_t *pool)
+{
+  svn_error_t *err = SVN_NO_ERROR;
+  VALUE proc, rb_pool;
+  *keyring_passwd = NULL;
+
+  svn_swig_rb_from_baton((VALUE)baton, &proc, &rb_pool);
+
+  if (!NIL_P(proc)) {
+    char error_message[] =
+      "svn_auth_gnome_keyring_unlock_prompt_func_t should"
+      "return a string, not '%s'.";
+
+    callback_baton_t cbb;
+    VALUE result;
+
+    cbb.receiver = proc;
+    cbb.message = id_call;
+    cbb.args = rb_ary_new3(1, c2r_string2(keyring_name));
+    result = invoke_callback_handle_error((VALUE)(&cbb), rb_pool, &err);
+
+    if (!NIL_P(result)) {
+      if (!RTEST(rb_obj_is_kind_of(result, rb_cString)))
+        rb_raise(rb_eTypeError, error_message, r2c_inspect(result));
+      *keyring_passwd = (char *)r2c_string(result, NULL, pool);
+    }
+  }
+
+  return err;
+}
+
+svn_error_t *
 svn_swig_rb_auth_username_prompt_func(svn_auth_cred_username_t **cred,
                                       void *baton,
                                       const char *realm,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h Tue Mar  6 17:50:23 2012
@@ -154,6 +154,8 @@ SVN_RB_SWIG_SWIGUTIL_EXPORT
 VALUE svn_swig_rb_apr_array_to_array_external_item2(const apr_array_header_t *ary);
 SVN_RB_SWIG_SWIGUTIL_EXPORT
 VALUE svn_swig_rb_apr_array_to_array_merge_range(const apr_array_header_t *ary);
+SVN_RB_SWIG_SWIGUTIL_EXPORT
+VALUE svn_swig_rb_apr_array_to_array_auth_provider_object(const apr_array_header_t *ary);
 
 SVN_RB_SWIG_SWIGUTIL_EXPORT
 VALUE svn_swig_rb_prop_apr_array_to_hash_prop(const apr_array_header_t *ary);
@@ -378,6 +380,13 @@ svn_error_t *svn_swig_rb_wc_relocation_v
 
 /* auth provider callbacks */
 SVN_RB_SWIG_SWIGUTIL_EXPORT
+svn_error_t * svn_swig_rb_auth_gnome_keyring_unlock_prompt_func(
+    char **keyring_passwd,
+    const char *keyring_name,
+    void *baton,
+    apr_pool_t *pool);
+
+SVN_RB_SWIG_SWIGUTIL_EXPORT
 svn_error_t *svn_swig_rb_auth_simple_prompt_func(
     svn_auth_cred_simple_t **cred,
     void *baton,

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/svn/core.rb
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/svn/core.rb?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/svn/core.rb (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/svn/core.rb Tue Mar  6 17:50:23 2012
@@ -279,6 +279,10 @@ module Svn
         add_prompt_provider("ssl_client_cert_pw", args, prompt, klass)
       end
 
+      def add_platform_specific_client_providers(config=nil)
+        add_providers(Core.auth_get_platform_specific_client_providers(config))
+      end
+
       private
       def add_prompt_provider(name, args, prompt, credential_class)
         real_prompt = Proc.new do |*prompt_args|
@@ -294,6 +298,10 @@ module Svn
       end
 
       def add_provider(provider)
+        add_providers([provider])
+      end
+
+      def add_providers(new_providers)
         if auth_baton
           providers = auth_baton.providers
           parameters = auth_baton.parameters
@@ -301,7 +309,7 @@ module Svn
           providers = []
           parameters = {}
         end
-        self.auth_baton = AuthBaton.new(providers + [provider], parameters)
+        self.auth_baton = AuthBaton.new(providers + new_providers, parameters)
       end
     end
 

Modified: subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/test/util.rb
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/test/util.rb?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/test/util.rb (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/bindings/swig/ruby/test/util.rb Tue Mar  6 17:50:23 2012
@@ -42,7 +42,7 @@ module SvnTestUtil
     @repos_uri = "file://#{@full_repos_path.sub(/^\/?/, '/')}"
     @svnserve_host = "127.0.0.1"
     @svnserve_ports = (64152..64282).collect{|x| x.to_s}
-    @wc_base_dir = File.join(Dir.tmpdir, "wc-tmp")
+    @wc_base_dir = Dir.mktmpdir
     @wc_path = File.join(@wc_base_dir, "wc")
     @full_wc_path = File.expand_path(@wc_path)
     @tmp_path = "tmp"

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_auth_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_auth_private.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_auth_private.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_auth_private.h Tue Mar  6 17:50:23 2012
@@ -53,9 +53,12 @@ extern "C" {
    from an external store, using REALMSTRING and USERNAME as keys.
    (The behavior is undefined if REALMSTRING or USERNAME are NULL.)
    If NON_INTERACTIVE is set, the user must not be involved in the
-   retrieval process.  POOL is used for any necessary allocation. */
-typedef svn_boolean_t (*svn_auth__password_get_t)
-  (const char **password,
+   retrieval process.  Set *DONE to TRUE if a password was stored
+   in *PASSWORD, to FALSE otherwise. POOL is used for any necessary
+   allocation. */
+typedef svn_error_t * (*svn_auth__password_get_t)
+  (svn_boolean_t *done,
+   const char **password,
    apr_hash_t *creds,
    const char *realmstring,
    const char *username,
@@ -66,10 +69,12 @@ typedef svn_boolean_t (*svn_auth__passwo
 /* A function that stores PASSWORD (or some encrypted version thereof)
    either directly in CREDS, or externally using REALMSTRING and USERNAME
    as keys into the external store.  If NON_INTERACTIVE is set, the user
-   must not be involved in the storage process.  POOL is used for any
-   necessary allocation. */
-typedef svn_boolean_t (*svn_auth__password_set_t)
-  (apr_hash_t *creds,
+   must not be involved in the storage process. Set *DONE to TRUE if the
+   password was store, to FALSE otherwise. POOL is used for any necessary
+   allocation. */
+typedef svn_error_t * (*svn_auth__password_set_t)
+  (svn_boolean_t *done,
+   apr_hash_t *creds,
    const char *realmstring,
    const char *username,
    const char *password,
@@ -111,8 +116,9 @@ svn_auth__simple_save_creds_helper(svn_b
 /* Implementation of svn_auth__password_get_t that retrieves
    the plaintext password from CREDS when USERNAME matches the stored
    credentials. */
-svn_boolean_t
-svn_auth__simple_password_get(const char **password,
+svn_error_t *
+svn_auth__simple_password_get(svn_boolean_t *done,
+                              const char **password,
                               apr_hash_t *creds,
                               const char *realmstring,
                               const char *username,
@@ -122,8 +128,9 @@ svn_auth__simple_password_get(const char
 
 /* Implementation of svn_auth__password_set_t that stores
    the plaintext password in CREDS. */
-svn_boolean_t
-svn_auth__simple_password_set(apr_hash_t *creds,
+svn_error_t *
+svn_auth__simple_password_set(svn_boolean_t *done,
+                              apr_hash_t *creds,
                               const char *realmstring,
                               const char *username,
                               const char *password,
@@ -169,8 +176,9 @@ svn_auth__ssl_client_cert_pw_file_save_c
 /* This implements the svn_auth__password_get_t interface.
    Set **PASSPHRASE to the plaintext passphrase retrieved from CREDS;
    ignore other parameters. */
-svn_boolean_t
-svn_auth__ssl_client_cert_pw_get(const char **passphrase,
+svn_error_t *
+svn_auth__ssl_client_cert_pw_get(svn_boolean_t *done,
+                                 const char **passphrase,
                                  apr_hash_t *creds,
                                  const char *realmstring,
                                  const char *username,
@@ -180,8 +188,9 @@ svn_auth__ssl_client_cert_pw_get(const c
 
 /* This implements the svn_auth__password_set_t interface.
    Store PASSPHRASE in CREDS; ignore other parameters. */
-svn_boolean_t
-svn_auth__ssl_client_cert_pw_set(apr_hash_t *creds,
+svn_error_t *
+svn_auth__ssl_client_cert_pw_set(svn_boolean_t *done,
+                                 apr_hash_t *creds,
                                  const char *realmstring,
                                  const char *username,
                                  const char *passphrase,

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cache.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cache.h Tue Mar  6 17:50:23 2012
@@ -296,7 +296,7 @@ svn_cache__membuffer_cache_create(svn_me
  * assumed to be an svn_stringbuf_t.
  *
  * If @a thread_safe is true, and APR is compiled with threads, all
- * accesses to the cache will be protected with a mutex, if the shared 
+ * accesses to the cache will be protected with a mutex, if the shared
  * @a memcache has also been created with thread_safe flag set.
  *
  * These caches do not support svn_cache__iter.
@@ -342,9 +342,9 @@ svn_cache__is_cachable(svn_cache__t *cac
 /**
  * Fetches a value indexed by @a key from @a cache into @a *value,
  * setting @a *found to TRUE iff it is in the cache and FALSE if it is
- * not found.  The value is copied into @a result_pool using the copy
+ * not found.  @a key may be NULL in which case @a *found will be
+ * FALSE.  The value is copied into @a result_pool using the deserialize
  * function provided to the cache's constructor.
- * ### what copy function? there are serialize/deserialize functions, no copy functions
  */
 svn_error_t *
 svn_cache__get(void **value,
@@ -357,7 +357,8 @@ svn_cache__get(void **value,
  * Stores the value @a value under the key @a key in @a cache.  Uses @a
  * scratch_pool for temporary allocations.  The cache makes copies of
  * @a key and @a value if necessary (that is, @a key and @a value may
- * have shorter lifetimes than the cache).
+ * have shorter lifetimes than the cache).  @a key may be NULL in which
+ * case the cache will remain unchanged.
  *
  * If there is already a value for @a key, this will replace it.  Bear
  * in mind that in some circumstances this may leak memory (that is,
@@ -401,8 +402,10 @@ svn_cache__iter(svn_boolean_t *completed
 /**
  * Similar to svn_cache__get() but will call a specific de-serialization
  * function @a func. @a found will be set depending on whether the @a key
- * has been found. Even if that reports @c TRUE, @a values may still return
- * a @c NULL pointer depending on the logic inside @a func.
+ * has been found. Even if that reports @c TRUE, @a value may still return
+ * a @c NULL pointer depending on the logic inside @a func.  For a @a NULL
+ * @a key, no data will be found.  @a value will be allocated in
+ * @a result_pool.
  */
 svn_error_t *
 svn_cache__get_partial(void **value,
@@ -417,8 +420,8 @@ svn_cache__get_partial(void **value,
  * Find the item identified by @a key in the @a cache. If it has been found,
  * call @a func for it and @a baton to potentially modify the data. Changed
  * data will be written back to the cache. If the item cannot be found,
- * @a func does not get called. @a scratch_pool is used for temporary
- * allocations.
+ * or if @a key is NULL, @a func does not get called. @a scratch_pool is
+ * used for temporary allocations.
  */
 svn_error_t *
 svn_cache__set_partial(svn_cache__t *cache,

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cmdline_private.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_cmdline_private.h Tue Mar  6 17:50:23 2012
@@ -92,7 +92,7 @@ svn_cmdline__parse_config_option(apr_arr
                                  apr_pool_t *pool);
 
 /** Sets the config options in @a config_options, an apr array containing
- * svn_cmdline__config_argument_t* elements to the configuration in @a cfg,
+ * @c svn_cmdline__config_argument_t* elements, to the configuration in @a cfg,
  * a hash mapping of <tt>const char *</tt> configuration file names to
  * @c svn_config_t *'s. Write warnings to stderr.
  *

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_mutex.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_mutex.h Tue Mar  6 17:50:23 2012
@@ -59,7 +59,7 @@ typedef void svn_mutex__t;
  * actually be created with a lifetime defined by @a result_pool. Otherwise,
  * the pointer will be set to @c NULL and @ref svn_mutex__lock as well as
  * @ref svn_mutex__unlock will be no-ops.
- * 
+ *
  * If threading is not supported by APR, this function is a no-op.
  */
 svn_error_t *
@@ -68,9 +68,9 @@ svn_mutex__init(svn_mutex__t **mutex,
                 apr_pool_t *result_pool);
 
 /** Acquire the @a mutex, if that has been enabled in @ref svn_mutex__init.
- * Make sure to call @ref svn_mutex__unlock some time later in the same 
+ * Make sure to call @ref svn_mutex__unlock some time later in the same
  * thread to release the mutex again. Recursive locking are not supported.
- * 
+ *
  * @note You should use @ref SVN_MUTEX__WITH_LOCK instead of explicit lock
  * aquisition and release.
  */
@@ -79,14 +79,14 @@ svn_mutex__lock(svn_mutex__t *mutex);
 
 /** Release the @a mutex, previously acquired using @ref svn_mutex__lock
  * that has been enabled in @ref svn_mutex__init.
- * 
- * Since this is often used as part of the calling function's exit 
- * sequence, we accept that function's current return code in @a err. 
+ *
+ * Since this is often used as part of the calling function's exit
+ * sequence, we accept that function's current return code in @a err.
  * If it is not @ref SVN_NO_ERROR, it will be used as the return value -
  * irrespective of the possible internal failures during unlock. If @a err
- * is @ref SVN_NO_ERROR, internal failures of this function will be 
+ * is @ref SVN_NO_ERROR, internal failures of this function will be
  * reported in the return value.
- * 
+ *
  * @note You should use @ref SVN_MUTEX__WITH_LOCK instead of explicit lock
  * aquisition and release.
  */
@@ -99,7 +99,7 @@ svn_mutex__unlock(svn_mutex__t *mutex,
  * this macro will return an @ref svn_error_t. This macro guarantees that
  * the @a mutex will always be unlocked again if it got locked successfully
  * locked by the first step.
- * 
+ *
  * @note Prefer using this macro instead of explicit lock aquisition and
  * release.
  */

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_ra_private.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_ra_private.h Tue Mar  6 17:50:23 2012
@@ -31,6 +31,7 @@
 
 #include "svn_error.h"
 #include "svn_ra.h"
+#include "svn_delta.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -126,6 +127,11 @@ svn_ra__get_fspath_relative_to_root(svn_
                                     const char *url,
                                     apr_pool_t *pool);
 
+/** Register CALLBACKS to be used with the Ev2 shims in RA_SESSION. */
+svn_error_t *
+svn_ra__register_editor_shim_callbacks(svn_ra_session_t *ra_session,
+                                       svn_delta_shim_callbacks_t *callbacks);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_repos_private.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_repos_private.h Tue Mar  6 17:50:23 2012
@@ -51,7 +51,7 @@ extern "C" {
  * repository via tools that use the svn_fs_* API directly (possibly
  * including svnadmin and svnlook).  This has happened before and there
  * are known (documented, but unsupported) upgrade paths in some cases.
- * 
+ *
  * @since New in 1.7.
  */
 svn_error_t *

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_wc_private.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/private/svn_wc_private.h Tue Mar  6 17:50:23 2012
@@ -263,6 +263,15 @@ svn_wc__externals_gather_definitions(apr
                                      apr_pool_t *result_pool,
                                      apr_pool_t *scratch_pool);
 
+/* Close the DB for LOCAL_ABSPATH.  Perform temporary allocations in
+   SCRATCH_POOL.
+
+   Wraps svn_wc__db_drop_root(). */
+svn_error_t *
+svn_wc__close_db(const char *external_abspath,
+                 svn_wc_context_t *wc_ctx,
+                 apr_pool_t *scratch_pool);
+
 /** Set @a *tree_conflict to a newly allocated @c
  * svn_wc_conflict_description_t structure describing the tree
  * conflict state of @a victim_abspath, or to @c NULL if @a victim_abspath
@@ -540,7 +549,7 @@ svn_wc__node_is_status_deleted(svn_boole
  * set @a *deleted_ancestor_abspath to @c NULL.
  * @a *deleted_ancestor_abspath is allocated in @a result_pool.
  * Use @a scratch_pool for all temporary allocations.
- */ 
+ */
 svn_error_t *
 svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
                                   svn_wc_context_t *wc_ctx,
@@ -1303,6 +1312,316 @@ svn_wc__resolve_relative_external_url(co
                                       apr_pool_t *result_pool,
                                       apr_pool_t *scratch_pool);
 
+
+/**
+ * Set @a *editor and @a *edit_baton to an editor that generates
+ * #svn_wc_status3_t structures and sends them through @a status_func /
+ * @a status_baton.  @a anchor_abspath is a working copy directory
+ * directory which will be used as the root of our editor.  If @a
+ * target_basename is not "", it represents a node in the @a anchor_abspath
+ * which is the subject of the editor drive (otherwise, the @a
+ * anchor_abspath is the subject).
+ *
+ * If @a set_locks_baton is non-@c NULL, it will be set to a baton that can
+ * be used in a call to the svn_wc_status_set_repos_locks() function.
+ *
+ * Callers drive this editor to describe working copy out-of-dateness
+ * with respect to the repository.  If this information is not
+ * available or not desired, callers should simply call the
+ * close_edit() function of the @a editor vtable.
+ *
+ * If the editor driver calls @a editor's set_target_revision() vtable
+ * function, then when the edit drive is completed, @a *edit_revision
+ * will contain the revision delivered via that interface.
+ *
+ * Assuming the target is a directory, then:
+ *
+ *   - If @a get_all is FALSE, then only locally-modified entries will be
+ *     returned.  If TRUE, then all entries will be returned.
+ *
+ *   - If @a depth is #svn_depth_empty, a status structure will
+ *     be returned for the target only; if #svn_depth_files, for the
+ *     target and its immediate file children; if
+ *     #svn_depth_immediates, for the target and its immediate
+ *     children; if #svn_depth_infinity, for the target and
+ *     everything underneath it, fully recursively.
+ *
+ *     If @a depth is #svn_depth_unknown, take depths from the
+ *     working copy and behave as above in each directory's case.
+ *
+ *     If the given @a depth is incompatible with the depth found in a
+ *     working copy directory, the found depth always governs.
+ *
+ * If @a no_ignore is set, statuses that would typically be ignored
+ * will instead be reported.
+ *
+ * @a ignore_patterns is an array of file patterns matching
+ * unversioned files to ignore for the purposes of status reporting,
+ * or @c NULL if the default set of ignorable file patterns should be used.
+ *
+ * If @a cancel_func is non-NULL, call it with @a cancel_baton while building
+ * the @a statushash to determine if the client has canceled the operation.
+ *
+ * If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is
+ * passed for updating. This will show excluded nodes show up as added in the
+ * repository.
+ *
+ * If @a server_performs_filtering is TRUE, assume that the server handles
+ * the ambient depth filtering, so this doesn't have to be handled in the
+ * editor.
+ *
+ * Allocate the editor itself in @a result_pool, and use @a scratch_pool
+ * for temporary allocations. The editor will do its temporary allocations
+ * in a subpool of @a result_pool.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__get_status_editor(const svn_delta_editor_t **editor,
+                          void **edit_baton,
+                          void **set_locks_baton,
+                          svn_revnum_t *edit_revision,
+                          svn_wc_context_t *wc_ctx,
+                          const char *anchor_abspath,
+                          const char *target_basename,
+                          svn_depth_t depth,
+                          svn_boolean_t get_all,
+                          svn_boolean_t no_ignore,
+                          svn_boolean_t depth_as_sticky,
+                          svn_boolean_t server_performs_filtering,
+                          const apr_array_header_t *ignore_patterns,
+                          svn_wc_status_func4_t status_func,
+                          void *status_baton,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
+
+/**
+ * Set @a *editor and @a *edit_baton to an editor and baton for updating a
+ * working copy.
+ *
+ * @a anchor_abspath is a local working copy directory, with a fully recursive
+ * write lock in @a wc_ctx, which will be used as the root of our editor.
+ *
+ * @a target_basename is the entry in @a anchor_abspath that will actually be
+ * updated, or the empty string if all of @a anchor_abspath should be updated.
+ *
+ * The editor invokes @a notify_func with @a notify_baton as the update
+ * progresses, if @a notify_func is non-NULL.
+ *
+ * If @a cancel_func is non-NULL, the editor will invoke @a cancel_func with
+ * @a cancel_baton as the update progresses to see if it should continue.
+ *
+ * If @a conflict_func is non-NULL, then invoke it with @a
+ * conflict_baton whenever a conflict is encountered, giving the
+ * callback a chance to resolve the conflict before the editor takes
+ * more drastic measures (such as marking a file conflicted, or
+ * bailing out of the update).
+ *
+ * If @a external_func is non-NULL, then invoke it with @a external_baton
+ * whenever external changes are encountered, giving the callback a chance
+ * to store the external information for processing.
+ *
+ * If @a diff3_cmd is non-NULL, then use it as the diff3 command for
+ * any merging; otherwise, use the built-in merge code.
+ *
+ * @a preserved_exts is an array of filename patterns which, when
+ * matched against the extensions of versioned files, determine for
+ * which such files any related generated conflict files will preserve
+ * the original file's extension as their own.  If a file's extension
+ * does not match any of the patterns in @a preserved_exts (which is
+ * certainly the case if @a preserved_exts is @c NULL or empty),
+ * generated conflict files will carry Subversion's custom extensions.
+ *
+ * @a target_revision is a pointer to a revision location which, after
+ * successful completion of the drive of this editor, will be
+ * populated with the revision to which the working copy was updated.
+ *
+ * If @a use_commit_times is TRUE, then all edited/added files will
+ * have their working timestamp set to the last-committed-time.  If
+ * FALSE, the working files will be touched with the 'now' time.
+ *
+ * If @a allow_unver_obstructions is TRUE, then allow unversioned
+ * obstructions when adding a path.
+ *
+ * If @a adds_as_modification is TRUE, a local addition at the same path
+ * as an incoming addition of the same node kind results in a normal node
+ * with a possible local modification, instead of a tree conflict.
+ *
+ * If @a depth is #svn_depth_infinity, update fully recursively.
+ * Else if it is #svn_depth_immediates, update the uppermost
+ * directory, its file entries, and the presence or absence of
+ * subdirectories (but do not descend into the subdirectories).
+ * Else if it is #svn_depth_files, update the uppermost directory
+ * and its immediate file entries, but not subdirectories.
+ * Else if it is #svn_depth_empty, update exactly the uppermost
+ * target, and don't touch its entries.
+ *
+ * If @a depth_is_sticky is set and @a depth is not
+ * #svn_depth_unknown, then in addition to updating PATHS, also set
+ * their sticky ambient depth value to @a depth.
+ *
+ * If @a server_performs_filtering is TRUE, assume that the server handles
+ * the ambient depth filtering, so this doesn't have to be handled in the
+ * editor.
+ *
+ * If @a fetch_dirents_func is not NULL, the update editor may call this
+ * callback, when asked to perform a depth restricted update. It will do this
+ * before returning the editor to allow using the primary ra session for this.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__get_update_editor(const svn_delta_editor_t **editor,
+                          void **edit_baton,
+                          svn_revnum_t *target_revision,
+                          svn_wc_context_t *wc_ctx,
+                          const char *anchor_abspath,
+                          const char *target_basename,
+                          svn_boolean_t use_commit_times,
+                          svn_depth_t depth,
+                          svn_boolean_t depth_is_sticky,
+                          svn_boolean_t allow_unver_obstructions,
+                          svn_boolean_t adds_as_modification,
+                          svn_boolean_t server_performs_filtering,
+                          svn_boolean_t clean_checkout,
+                          const char *diff3_cmd,
+                          const apr_array_header_t *preserved_exts,
+                          svn_wc_dirents_func_t fetch_dirents_func,
+                          void *fetch_dirents_baton,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
+                          void *conflict_baton,
+                          svn_wc_external_update_t external_func,
+                          void *external_baton,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          svn_wc_notify_func2_t notify_func,
+                          void *notify_baton,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
+
+/**
+ * A variant of svn_wc__get_update_editor().
+ *
+ * Set @a *editor and @a *edit_baton to an editor and baton for "switching"
+ * a working copy to a new @a switch_url.  (Right now, this URL must be
+ * within the same repository that the working copy already comes
+ * from.)  @a switch_url must not be @c NULL.
+ *
+ * All other parameters behave as for svn_wc__get_update_editor().
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__get_switch_editor(const svn_delta_editor_t **editor,
+                          void **edit_baton,
+                          svn_revnum_t *target_revision,
+                          svn_wc_context_t *wc_ctx,
+                          const char *anchor_abspath,
+                          const char *target_basename,
+                          const char *switch_url,
+                          svn_boolean_t use_commit_times,
+                          svn_depth_t depth,
+                          svn_boolean_t depth_is_sticky,
+                          svn_boolean_t allow_unver_obstructions,
+                          svn_boolean_t server_performs_filtering,
+                          const char *diff3_cmd,
+                          const apr_array_header_t *preserved_exts,
+                          svn_wc_dirents_func_t fetch_dirents_func,
+                          void *fetch_dirents_baton,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
+                          void *conflict_baton,
+                          svn_wc_external_update_t external_func,
+                          void *external_baton,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          svn_wc_notify_func2_t notify_func,
+                          void *notify_baton,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
+
+
+/**
+ * Return an @a editor/@a edit_baton for diffing a working copy against the
+ * repository. The editor is allocated in @a result_pool; temporary
+ * calculations are performed in @a scratch_pool.
+ *
+ * This editor supports diffing either the actual files and properties in the
+ * working copy (when @a use_text_base is #FALSE), or the current pristine
+ * information (when @a use_text_base is #TRUE) against the editor driver.
+ *
+ * @a anchor_abspath/@a target represent the base of the hierarchy to be
+ * compared. The diff callback paths will be relative to this path.
+ *
+ * Diffs will be reported as valid relpaths, with @a anchor_abspath being
+ * the root ("").
+ *
+ * @a callbacks/@a callback_baton is the callback table to use.
+ *
+ * If @a depth is #svn_depth_empty, just diff exactly @a target or
+ * @a anchor_path if @a target is empty.  If #svn_depth_files then do the same
+ * and for top-level file entries as well (if any).  If
+ * #svn_depth_immediates, do the same as #svn_depth_files but also diff
+ * top-level subdirectories at #svn_depth_empty.  If #svn_depth_infinity,
+ * then diff fully recursively.
+ *
+ * @a ignore_ancestry determines whether paths that have discontinuous node
+ * ancestry are treated as delete/add or as simple modifications.  If
+ * @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will
+ * result in the diff given as a full delete followed by an add.
+ *
+ * @a show_copies_as_adds determines whether paths added with history will
+ * appear as a diff against their copy source, or whether such paths will
+ * appear as if they were newly added in their entirety.
+ *
+ * If @a use_git_diff_format is TRUE, copied paths will be treated as added
+ * if they weren't modified after being copied. This allows the callbacks
+ * to generate appropriate --git diff headers for such files.
+ *
+ * Normally, the difference from repository->working_copy is shown.
+ * If @a reverse_order is TRUE, then show working_copy->repository diffs.
+ *
+ * If @a cancel_func is non-NULL, it will be used along with @a cancel_baton
+ * to periodically check if the client has canceled the operation.
+ *
+ * @a changelist_filter is an array of <tt>const char *</tt> changelist
+ * names, used as a restrictive filter on items whose differences are
+ * reported; that is, don't generate diffs about any item unless
+ * it's a member of one of those changelists.  If @a changelist_filter is
+ * empty (or altogether @c NULL), no changelist filtering occurs.
+ *
+  * If @a server_performs_filtering is TRUE, assume that the server handles
+ * the ambient depth filtering, so this doesn't have to be handled in the
+ * editor.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__get_diff_editor(const svn_delta_editor_t **editor,
+                        void **edit_baton,
+                        svn_wc_context_t *wc_ctx,
+                        const char *anchor_abspath,
+                        const char *target,
+                        svn_depth_t depth,
+                        svn_boolean_t ignore_ancestry,
+                        svn_boolean_t show_copies_as_adds,
+                        svn_boolean_t use_git_diff_format,
+                        svn_boolean_t use_text_base,
+                        svn_boolean_t reverse_order,
+                        svn_boolean_t server_performs_filtering,
+                        const apr_array_header_t *changelist_filter,
+                        const svn_wc_diff_callbacks4_t *callbacks,
+                        void *callback_baton,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_checksum.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_checksum.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_checksum.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_checksum.h Tue Mar  6 17:50:23 2012
@@ -239,6 +239,14 @@ svn_checksum_final(svn_checksum_t **chec
 apr_size_t
 svn_checksum_size(const svn_checksum_t *checksum);
 
+/**
+ * Return @c TRUE iff CHECKSUM matches the checksum for the empty string.
+ *
+ * @since New in 1.8.
+ */
+svn_boolean_t
+svn_checksum_is_empty_checksum(svn_checksum_t *checksum);
+
 
 /**
  * Return an error of type #SVN_ERR_CHECKSUM_MISMATCH for @a actual and

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_client.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_client.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_client.h Tue Mar  6 17:50:23 2012
@@ -2255,7 +2255,7 @@ typedef struct svn_client_status_t
    * This will be NULL for moved-here nodes that are just part of a subtree
    * that was moved along (and are not themselves a root of a different move
    * operation).
-   * 
+   *
    * @since New in 1.8. */
   const char *moved_from_abspath;
 
@@ -2877,6 +2877,7 @@ svn_client_diff6(const apr_array_header_
                  svn_boolean_t no_diff_deleted,
                  svn_boolean_t show_copies_as_adds,
                  svn_boolean_t ignore_content_type,
+                 svn_boolean_t ignore_prop_diff,
                  svn_boolean_t use_git_diff_format,
                  const char *header_encoding,
                  svn_stream_t *outstream,
@@ -2886,7 +2887,8 @@ svn_client_diff6(const apr_array_header_
                  apr_pool_t *pool);
 
 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
- * instead of @a outstream and @a errstream.
+ * instead of @a outstream and @a errstream, and always showing property
+ * changes.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.7.
@@ -3035,6 +3037,7 @@ svn_client_diff_peg6(const apr_array_hea
                      svn_boolean_t no_diff_deleted,
                      svn_boolean_t show_copies_as_adds,
                      svn_boolean_t ignore_content_type,
+                     svn_boolean_t ignore_prop_diff,
                      svn_boolean_t use_git_diff_format,
                      const char *header_encoding,
                      svn_stream_t *outstream,
@@ -3044,7 +3047,8 @@ svn_client_diff_peg6(const apr_array_hea
                      apr_pool_t *pool);
 
 /** Similar to svn_client_diff_peg6(), but with @a outfile and @a errfile,
- * instead of @a outstream and @a errstream.
+ * instead of @a outstream and @a errstream, and always showing property
+ * changes.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.7.

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_config.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_config.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_config.h Tue Mar  6 17:50:23 2012
@@ -135,6 +135,8 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_USE_SASL                  "use-sasl"
 #define SVN_CONFIG_OPTION_MIN_SSF                   "min-encryption"
 #define SVN_CONFIG_OPTION_MAX_SSF                   "max-encryption"
+/** @since New in 1.8. */
+#define SVN_CONFIG_SECTION_HOOKS_ENV            "hooks-env"
 
 /* For repository password database */
 #define SVN_CONFIG_SECTION_USERS                "users"

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_delta.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_delta.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_delta.h Tue Mar  6 17:50:23 2012
@@ -651,7 +651,7 @@ svn_txdelta_skip_svndiff_window(apr_file
  * Each of these takes a directory baton, indicating the directory
  * in which the change takes place, and a @a path argument, giving the
  * path of the file, subdirectory, or directory entry to change.
- * 
+ *
  * The @a path argument to each of the callbacks is relative to the
  * root of the edit.  Editors will usually want to join this relative
  * path with some base stored in the edit baton (e.g. a URL, or a
@@ -792,8 +792,9 @@ svn_txdelta_skip_svndiff_window(apr_file
  * number of operations later.  As a result, an editor driver must not
  * assume that an error from an editing function resulted from the
  * particular operation being detected.  Moreover, once an editing
- * function returns an error, the edit is dead; the only further
- * operation which may be called on the editor is abort_edit.
+ * function (including @c close_edit) returns an error, the edit is
+ * dead; the only further operation which may be called on the editor
+ * is @c abort_edit.
  */
 typedef struct svn_delta_editor_t
 {

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_editor.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_editor.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_editor.h Tue Mar  6 17:50:23 2012
@@ -176,9 +176,9 @@ extern "C" {
  *      svn_editor_setcb_add_file() \n
  *      svn_editor_setcb_add_symlink() \n
  *      svn_editor_setcb_add_absent() \n
- *      svn_editor_setcb_set_props() \n
- *      svn_editor_setcb_set_text() \n
- *      svn_editor_setcb_set_target() \n
+ *      svn_editor_setcb_alter_directory() \n
+ *      svn_editor_setcb_alter_file() \n
+ *      svn_editor_setcb_alter_symlink() \n
  *      svn_editor_setcb_delete() \n
  *      svn_editor_setcb_copy() \n
  *      svn_editor_setcb_move() \n
@@ -199,9 +199,9 @@ extern "C" {
  *      svn_editor_add_file() \n
  *      svn_editor_add_symlink() \n
  *      svn_editor_add_absent() \n
- *      svn_editor_set_props() \n
- *      svn_editor_set_text() \n
- *      svn_editor_set_target() \n
+ *      svn_editor_alter_directory() \n
+ *      svn_editor_alter_file() \n
+ *      svn_editor_alter_symlink() \n
  *      svn_editor_delete() \n
  *      svn_editor_copy() \n
  *      svn_editor_move() \n
@@ -241,34 +241,25 @@ extern "C" {
  *   follow for each child mentioned in the @a children argument of any
  *   svn_editor_add_directory() call.
  *
- * - svn_editor_set_props()
- *   - The @a complete argument must be TRUE if no more calls will follow on
- *     the same path. @a complete must always be TRUE for directories.
- *   - If @a complete is FALSE, and:
- *     - if @a relpath is a file, this must (at some point) be followed by
- *       an svn_editor_set_text() call on the same path.
- *     - if @a relpath is a symlink, this must (at some point) be followed by
- *       an svn_editor_set_target() call on the same path.
+ * - For each node created with add_*, if its parent was created using
+ *   svn_editor_add_directory(), then the new child node MUST have been
+ *   mentioned in the @a children parameter of the parent's creation.
+ *   This allows the parent directory to properly mark the child as
+ *   "incomplete" until the child's add_* call arrives.
  *
- * - svn_editor_set_text() and svn_editor_set_target() must always occur
- *   @b after an svn_editor_set_props() call on the same path, if any.
- *
- *   In other words, if there are two calls coming in on the same path, the
- *   first of them has to be svn_editor_set_props().
- *
- * - Other than the above two pairs of linked operations, a path should
- *   never be referenced more than once by the add_* and set_* and the
+ * - A path should
+ *   never be referenced more than once by the add_*, alter_*, and
  *   delete operations (the "Once Rule"). The source path of a copy (and
  *   its children, if a directory) may be copied many times, and are
  *   otherwise subject to the Once Rule. The destination path of a copy
- *   or move may have set_* operations applied, but not add_* or delete.
+ *   or move may have alter_* operations applied, but not add_* or delete.
  *   If the destination path of a copy, move, or rotate is a directory,
  *   then its children are subject to the Once Rule. The source path of
  *   a move (and its child paths) may be referenced in add_*, or as the
  *   destination of a copy (where these new or copied nodes are subject
  *   to the Once Rule). Paths listed in a rotation are both sources and
  *   destinations, so they may not be referenced again in an add_* or a
- *   deletion; these paths may have set_* operations applied.
+ *   deletion; these paths may have alter_* operations applied.
  *
  * - The ancestor of an added, copied-here, moved-here, rotated, or
  *   modified node may not be deleted. The ancestor may not be moved
@@ -294,7 +285,7 @@ extern "C" {
  *   should be used to describe a semantic move.
  *
  * - Paths mentioned in svn_editor_rotate() may have their properties
- *   and contents edited (via set_* calls) by a previous or later call,
+ *   and contents edited (via alter_* calls) by a previous or later call,
  *   but they may not be subject to a later move, rotate, or deletion.
  *
  * - One of svn_editor_complete() or svn_editor_abort() must be called
@@ -304,18 +295,16 @@ extern "C" {
  *   svn_editor_abort() must imply that the transformation was not completed
  *   successfully.
  *
- * - If any callback invocation returns with an error, the driver must
- *   invoke svn_editor_abort() and stop transmitting operations.
+ * - If any callback invocation (besides svn_editor_complete()) returns
+ *   with an error, the driver must invoke svn_editor_abort() and stop
+ *   transmitting operations.
  * \n\n
  *
  * <h3>Receiving Restrictions</h3>
- * All callbacks must complete their handling of a path before they
- * return, except for the following pairs, where a change must be completed
- * when receiving the second callback in each pair:
- *  - svn_editor_set_props() (if @a complete is FALSE) and
- *    svn_editor_set_text() (if the node is a file)
- *  - svn_editor_set_props() (if @a complete is FALSE) and
- *    svn_editor_set_target() (if the node is a symbolic link)
+ *
+ * All callbacks must complete their handling of a path before they return.
+ * Since future callbacks will never reference this path again (due to the
+ * Once Rule), the changes can and should be completed.
  *
  * This restriction is not recursive -- a directory's children may remain
  * incomplete until later callback calls are received.
@@ -394,6 +383,13 @@ extern "C" {
  */
 typedef struct svn_editor_t svn_editor_t;
 
+/** The kind of the checksum to be used throughout the #svn_editor_t APIs.
+ *
+ * @note ### This may change before Ev2 is official released, so just like
+ * everything else in this file, please don't rely upon it until then.
+ */
+#define SVN_EDITOR_CHECKSUM_KIND svn_checksum_sha1
+
 
 /** These function types define the callback functions a tree delta consumer
  * implements.
@@ -463,35 +459,36 @@ typedef svn_error_t *(*svn_editor_cb_add
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_props(), svn_editor_t.
+/** @see svn_editor_alter_directory(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_props_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_directory_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
   apr_hash_t *props,
-  svn_boolean_t complete,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_text(), svn_editor_t.
+/** @see svn_editor_alter_file(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_text_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_file_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const svn_checksum_t *checksum,
   svn_stream_t *contents,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_target(), svn_editor_t.
+/** @see svn_editor_alter_symlink(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_target_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_symlink_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const char *target,
   apr_pool_t *scratch_pool);
 
@@ -619,38 +616,38 @@ svn_editor_setcb_add_absent(svn_editor_t
                             svn_editor_cb_add_absent_t callback,
                             apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_props_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_directory_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_props(svn_editor_t *editor,
-                           svn_editor_cb_set_props_t callback,
-                           apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_directory(svn_editor_t *editor,
+                                 svn_editor_cb_alter_directory_t callback,
+                                 apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_text_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_file_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_text(svn_editor_t *editor,
-                          svn_editor_cb_set_text_t callback,
-                          apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_file(svn_editor_t *editor,
+                            svn_editor_cb_alter_file_t callback,
+                            apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_target_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_symlink_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_target(svn_editor_t *editor,
-                            svn_editor_cb_set_target_t callback,
-                            apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_symlink(svn_editor_t *editor,
+                               svn_editor_cb_alter_symlink_t callback,
+                               apr_pool_t *scratch_pool);
 
 /** Sets the #svn_editor_cb_delete_t callback in @a editor
  * to @a callback.
@@ -730,9 +727,9 @@ typedef struct svn_editor_cb_many_t
   svn_editor_cb_add_file_t cb_add_file;
   svn_editor_cb_add_symlink_t cb_add_symlink;
   svn_editor_cb_add_absent_t cb_add_absent;
-  svn_editor_cb_set_props_t cb_set_props;
-  svn_editor_cb_set_text_t cb_set_text;
-  svn_editor_cb_set_target_t cb_set_target;
+  svn_editor_cb_alter_directory_t cb_alter_directory;
+  svn_editor_cb_alter_file_t cb_alter_file;
+  svn_editor_cb_alter_symlink_t cb_alter_symlink;
   svn_editor_cb_delete_t cb_delete;
   svn_editor_cb_copy_t cb_copy;
   svn_editor_cb_move_t cb_move;
@@ -773,7 +770,9 @@ svn_editor_setcb_many(svn_editor_t *edit
  *
  * A complete listing of the immediate children of @a relpath that will be
  * added subsequently is given in @a children. @a children is an array of
- * const char*s, each giving the basename of an immediate child.
+ * const char*s, each giving the basename of an immediate child. It is an
+ * error to pass NULL for @a children; use an empty array to indicate
+ * the new directory will have no children.
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  */
@@ -790,17 +789,18 @@ svn_editor_add_directory(svn_editor_t *e
  * is expected to exist.
  *
  * The file's contents are specified in @a contents which has a checksum
- * matching @a checksum.
+ * matching @a checksum. Both values must be non-NULL.
  *
  * Set the properties of the new file to @a props, which is an
  * apr_hash_t holding key-value pairs. Each key is a const char* of a
  * property name, each value is a const svn_string_t*. If no properties are
- * being set on the new file, @a props must be NULL.
+ * being set on the new file, @a props must be the empty hash. It is an
+ * error to pass NULL for @a props.
  *
  * If this add is expected to replace a previously existing file, symlink or
  * directory at @a relpath, the revision number of the node to be replaced
  * must be given in @a replaces_rev. Otherwise, @a replaces_rev must be
- * SVN_INVALID_REVNUM.  Note: it is not allowed to call a "delete" followed
+ * #SVN_INVALID_REVNUM.  Note: it is not allowed to call a "delete" followed
  * by an "add" on the same path. Instead, an "add" with @a replaces_rev set
  * accordingly MUST be used.
  *
@@ -851,66 +851,82 @@ svn_editor_add_absent(svn_editor_t *edit
                       svn_kind_t kind,
                       svn_revnum_t replaces_rev);
 
-/** Drive @a editor's #svn_editor_cb_set_props_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_directory_t callback.
  *
- * Set or change properties on the existing node at @a relpath.  This
- * function sends *all* properties, both existing and changes.
- * ### TODO @todo What is REVISION for?
- * ### HKW: This is puzzling to me as well...
- * ###
- * ### what about "entry props"? will these still be handled via
- * ### the general prop function?
+ * Alter the properties of the directory at @a relpath. @a revision
+ * specifies the expected revision of the directory. This is used to
+ * catched attempts at altering out-of-date directories. If the
+ * directory does not have a corresponding revision in the repository
+ * (e.g. it has not yet been committed), then @a revision should be
+ * #SVN_INVALID_REVNUM.
  *
  * For a description of @a props, see svn_editor_add_file().
  *
- * @a complete must be FALSE if and only if
- * - @a relpath is a file and an svn_editor_set_text() call will follow on
- *   the same path, or
- * - @a relpath is a symbolic link and an svn_editor_set_target() call will
- *   follow on the same path.
- *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_props(svn_editor_t *editor,
-                     const char *relpath,
-                     svn_revnum_t revision,
-                     apr_hash_t *props,
-                     svn_boolean_t complete);
+svn_editor_alter_directory(svn_editor_t *editor,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           apr_hash_t *props);
 
-/** Drive @a editor's #svn_editor_cb_set_text_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_file_t callback.
+ *
+ * Alter the properties and/or the contents of the file at @a relpath
+ * with @a revision as its expected revision. See svn_editor_alter_directory()
+ * for more information about @a revision.
+ *
+ * If @a props is non-NULL, then the properties will be applied.
  *
- * Set/change the text content of a file at @a relpath to @a contents
- * with checksum @a checksum.
- * ### TODO @todo Does this send the *complete* content, always?
- * ### TODO @todo What is REVISION for?
- * ### TODO @todo Who is responsible for closing the stream?
+ * If @a contents is non-NULL, then the stream will be copied to
+ * the file, and its checksum must match @a checksum (which must also
+ * be non-NULL). If @a contents is NULL, then @a checksum must also
+ * be NULL, and no change will be applied to the file's contents.
+ *
+ * The properties and/or the contents must be changed. It is an error to
+ * pass NULL for @a props, @a checksum, and @a contents.
+ *
+ * For a description of @a checksum, and @a contents see
+ * svn_editor_add_file(). This functions allows @a props to be NULL, but
+ * the parameter is otherwise described by svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_text(svn_editor_t *editor,
-                    const char *relpath,
-                    svn_revnum_t revision,
-                    const svn_checksum_t *checksum,
-                    svn_stream_t *contents);
+svn_editor_alter_file(svn_editor_t *editor,
+                      const char *relpath,
+                      svn_revnum_t revision,
+                      apr_hash_t *props,
+                      const svn_checksum_t *checksum,
+                      svn_stream_t *contents);
 
-/** Drive @a editor's #svn_editor_cb_set_target_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_symlink_t callback.
+ *
+ * Alter the properties and/or the target of the symlink at @a relpath
+ * with @a revision as its expected revision. See svn_editor_alter_directory()
+ * for more information about @a revision.
+ *
+ * If @a props is non-NULL, then the properties will be applied.
  *
- * Set/change the link target that a symbolic link at @a relpath points at
- * to @a target.
- * ### TODO @todo What is REVISION for?
+ * If @a target is non-NULL, then the symlink's target will be updated.
+ *
+ * The properties and/or the target must be changed. It is an error to
+ * pass NULL for @a props and @a target.
+ *
+ * This functions allows @a props to be NULL, but the parameter is
+ * otherwise described by svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_target(svn_editor_t *editor,
-                      const char *relpath,
-                      svn_revnum_t revision,
-                      const char *target);
+svn_editor_alter_symlink(svn_editor_t *editor,
+                         const char *relpath,
+                         svn_revnum_t revision,
+                         apr_hash_t *props,
+                         const char *target);
 
 /** Drive @a editor's #svn_editor_cb_delete_t callback.
  *
@@ -948,20 +964,6 @@ svn_editor_copy(svn_editor_t *editor,
  *
  * For a description of @a replaces_rev, see svn_editor_add_file().
  *
- * ### stsp: How would I describe a merge of revision range rA-rB,
- * ###   within which a file foo.c was delete in rN, re-created in rM,
- * ###   and then renamed to bar.c in rX?
- * ###   Would the following be valid?
- * ###   svn_editor_add_file(ed, "foo.c", props, rN);
- * ###   svn_editor_move(ed, "foo.c", rM, "bar.c", rN);
- * ###
- * ### gstein: An editor is used to make changes to a tree rather than
- * ###   model *how* the tree changed. If the receiver's tree is at
- * ###   revision N-1, then the operations would be:
- * ###     svn_editor_delete(ed, "foo.c", N-1);
- * ###     svn_editor_copy(ed, "foo.c", M, "bar.c", SVN_INVALID_REVNUM);
- * ###   That edits the tree to the appropriate state.
- *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
@@ -976,7 +978,7 @@ svn_editor_move(svn_editor_t *editor,
  *
  * Perform a rotation among multiple nodes in the target tree.
  *
- * The @relpaths and @revisions arrays (pair-wise) specify nodes in the
+ * The @a relpaths and @a revisions arrays (pair-wise) specify nodes in the
  * tree which are located at a path and expected to be at a specific
  * revision. These nodes are simultaneously moved in a rotation pattern.
  * For example, the node at index 0 of @a relpaths and @a revisions will

Modified: subversion/branches/reintegrate-keep-alive/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/reintegrate-keep-alive/subversion/include/svn_error.h?rev=1297604&r1=1297603&r2=1297604&view=diff
==============================================================================
--- subversion/branches/reintegrate-keep-alive/subversion/include/svn_error.h (original)
+++ subversion/branches/reintegrate-keep-alive/subversion/include/svn_error.h Tue Mar  6 17:50:23 2012
@@ -479,11 +479,16 @@ svn_error_t *svn_error_purge_tracing(svn
  *
  * @since New in 1.6.
  */
+#ifdef __clang_analyzer__
+#include <assert.h>
+#define SVN_ERR_ASSERT(expr)       assert((expr))
+#else
 #define SVN_ERR_ASSERT(expr)                                            \
   do {                                                                  \
     if (!(expr))                                                        \
       SVN_ERR(svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr)); \
   } while (0)
+#endif
 
 /** Similar to SVN_ERR_ASSERT(), but without the option of returning
  * an error to the calling function.