You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/09/26 13:59:01 UTC

svn commit: r1001417 [1/7] - in /subversion/branches/performance: ./ build/ notes/ notes/http-and-webdav/ subversion/bindings/javahl/native/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/bindings/javahl/tests/org/tigris/subv...

Author: stefan2
Date: Sun Sep 26 11:58:58 2010
New Revision: 1001417

URL: http://svn.apache.org/viewvc?rev=1001417&view=rev
Log:
On the performance branch:
Bring up-to-date with trunk.

Added:
    subversion/branches/performance/subversion/libsvn_ra/debug_reporter.c
      - copied unchanged from r1001415, subversion/trunk/subversion/libsvn_ra/debug_reporter.c
    subversion/branches/performance/subversion/libsvn_ra/debug_reporter.h
      - copied unchanged from r1001415, subversion/trunk/subversion/libsvn_ra/debug_reporter.h
    subversion/branches/performance/subversion/tests/cmdline/atomic-ra-revprop-change.c
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.expected.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.expected.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.expected.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.expected.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/repo-with-copy-of-root-dir.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/repo-with-copy-of-root-dir.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file2.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file2.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/trunk-A-changes.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/trunk-A-changes.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/trunk-A-changes.expected.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/trunk-A-changes.expected.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/trunk-only.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/trunk-only.dump
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests_data/trunk-only.expected.dump
      - copied unchanged from r1001415, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/trunk-only.expected.dump
Modified:
    subversion/branches/performance/   (props changed)
    subversion/branches/performance/build.conf
    subversion/branches/performance/build/transform_libtool_scripts.sh
    subversion/branches/performance/notes/http-and-webdav/webdav-protocol
    subversion/branches/performance/notes/subversion-design.html
    subversion/branches/performance/subversion/bindings/javahl/native/BlameCallback.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/ClientContext.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.h
    subversion/branches/performance/subversion/bindings/javahl/native/LogMessageCallback.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/ProplistCallback.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/ReposNotifyCallback.cpp
    subversion/branches/performance/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/performance/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/performance/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
    subversion/branches/performance/subversion/include/mod_dav_svn.h
    subversion/branches/performance/subversion/include/private/svn_dav_protocol.h
    subversion/branches/performance/subversion/include/svn_client.h
    subversion/branches/performance/subversion/include/svn_dav.h
    subversion/branches/performance/subversion/include/svn_error.h
    subversion/branches/performance/subversion/include/svn_error_codes.h
    subversion/branches/performance/subversion/include/svn_fs.h
    subversion/branches/performance/subversion/include/svn_io.h
    subversion/branches/performance/subversion/include/svn_ra.h
    subversion/branches/performance/subversion/include/svn_ra_svn.h
    subversion/branches/performance/subversion/include/svn_repos.h
    subversion/branches/performance/subversion/include/svn_wc.h
    subversion/branches/performance/subversion/libsvn_client/deprecated.c
    subversion/branches/performance/subversion/libsvn_client/externals.c
    subversion/branches/performance/subversion/libsvn_client/prop_commands.c
    subversion/branches/performance/subversion/libsvn_client/relocate.c
    subversion/branches/performance/subversion/libsvn_diff/parse-diff.c
    subversion/branches/performance/subversion/libsvn_fs/access.c
    subversion/branches/performance/subversion/libsvn_fs_base/revs-txns.c
    subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/performance/subversion/libsvn_ra/deprecated.c
    subversion/branches/performance/subversion/libsvn_ra/ra_loader.c
    subversion/branches/performance/subversion/libsvn_ra/ra_loader.h
    subversion/branches/performance/subversion/libsvn_ra/wrapper_template.h
    subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/performance/subversion/libsvn_ra_neon/commit.c
    subversion/branches/performance/subversion/libsvn_ra_neon/fetch.c
    subversion/branches/performance/subversion/libsvn_ra_neon/options.c
    subversion/branches/performance/subversion/libsvn_ra_neon/props.c
    subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h
    subversion/branches/performance/subversion/libsvn_ra_neon/util.c
    subversion/branches/performance/subversion/libsvn_ra_serf/commit.c
    subversion/branches/performance/subversion/libsvn_ra_serf/options.c
    subversion/branches/performance/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/performance/subversion/libsvn_ra_serf/replay.c
    subversion/branches/performance/subversion/libsvn_ra_serf/util.c
    subversion/branches/performance/subversion/libsvn_ra_svn/client.c
    subversion/branches/performance/subversion/libsvn_ra_svn/protocol
    subversion/branches/performance/subversion/libsvn_repos/deprecated.c
    subversion/branches/performance/subversion/libsvn_repos/fs-wrap.c
    subversion/branches/performance/subversion/libsvn_subr/error.c
    subversion/branches/performance/subversion/libsvn_subr/sqlite.c
    subversion/branches/performance/subversion/libsvn_subr/svn_string.c
    subversion/branches/performance/subversion/libsvn_wc/copy.c
    subversion/branches/performance/subversion/libsvn_wc/deprecated.c
    subversion/branches/performance/subversion/libsvn_wc/entries.c
    subversion/branches/performance/subversion/libsvn_wc/relocate.c
    subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/performance/subversion/libsvn_wc/wc_db.c
    subversion/branches/performance/subversion/libsvn_wc/wc_db.h
    subversion/branches/performance/subversion/mod_dav_svn/authz.c
    subversion/branches/performance/subversion/mod_dav_svn/deadprops.c
    subversion/branches/performance/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/performance/subversion/mod_dav_svn/repos.c
    subversion/branches/performance/subversion/mod_dav_svn/util.c
    subversion/branches/performance/subversion/mod_dav_svn/version.c
    subversion/branches/performance/subversion/po/fr.po
    subversion/branches/performance/subversion/svn/main.c
    subversion/branches/performance/subversion/svn/switch-cmd.c
    subversion/branches/performance/subversion/svnrdump/dump_editor.c
    subversion/branches/performance/subversion/svnrdump/dump_editor.h
    subversion/branches/performance/subversion/svnrdump/load_editor.c
    subversion/branches/performance/subversion/svnrdump/load_editor.h
    subversion/branches/performance/subversion/svnrdump/svnrdump.c
    subversion/branches/performance/subversion/svnserve/cyrus_auth.c
    subversion/branches/performance/subversion/svnserve/serve.c
    subversion/branches/performance/subversion/svnsync/main.c
    subversion/branches/performance/subversion/tests/cmdline/   (props changed)
    subversion/branches/performance/subversion/tests/cmdline/prop_tests.py
    subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/performance/subversion/tests/cmdline/svntest/main.py
    subversion/branches/performance/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/performance/subversion/tests/cmdline/switch_tests.py
    subversion/branches/performance/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/performance/subversion/tests/libsvn_subr/cache-test.c
    subversion/branches/performance/subversion/tests/libsvn_subr/target-test.c
    subversion/branches/performance/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/performance/tools/client-side/svnmucc/svnmucc-test.py
    subversion/branches/performance/tools/client-side/svnmucc/svnmucc.c
    subversion/branches/performance/tools/dev/wc-format.py

Propchange: subversion/branches/performance/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Sep 26 11:58:58 2010
@@ -1,4 +1,5 @@
 /subversion/branches/1.5.x-r30215:870312
+/subversion/branches/atomic-revprop:965046-1000689
 /subversion/branches/bdb-reverse-deltas:872050-872529
 /subversion/branches/diff-callbacks3:870059-870761
 /subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118
@@ -36,4 +37,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:962911-995462,995465-999095
+/subversion/trunk:962911-995462,995465-999095,999111-1001415

Modified: subversion/branches/performance/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/performance/build.conf?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/build.conf (original)
+++ subversion/branches/performance/build.conf Sun Sep 26 11:58:58 2010
@@ -990,6 +990,15 @@ install = test
 libs = libsvn_wc libsvn_subr apriconv apr
 testing = skip
 
+[atomic-ra-revprop-change]
+type = exe
+path = subversion/tests/cmdline
+sources = atomic-ra-revprop-change.c
+install = test
+libs = libsvn_ra libsvn_subr apriconv apr
+testing = skip
+
+
 
 # ----------------------------------------------------------------------------
 #
@@ -1091,7 +1100,7 @@ libs = __ALL__
        diff-diff3-test
        ra-local-test
        svndiff-test vdelta-test
-       entries-dump
+       entries-dump atomic-ra-revprop-change
        diff-test diff3-test diff4-test
        client-test
        tree-conflict-data-test db-test pristine-store-test entries-compat-test

Modified: subversion/branches/performance/build/transform_libtool_scripts.sh
URL: http://svn.apache.org/viewvc/subversion/branches/performance/build/transform_libtool_scripts.sh?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/build/transform_libtool_scripts.sh (original)
+++ subversion/branches/performance/build/transform_libtool_scripts.sh Sun Sep 26 11:58:58 2010
@@ -57,17 +57,20 @@ svnserve="$delta $fs $ra_svn $repos $sub
 svnsync="$auth_gnome_keyring $auth_kwallet $delta $ra $subr"
 svnversion="$subr $wc"
 entries_dump="$subr $wc"
+atomic_ra_revprop_change="$subr $ra"
 
 # Variable 'executables' containing names of variables corresponding to executables
-executables="svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion entries_dump"
+executables="svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion entries_dump atomic_ra_revprop_change"
 
 for executable in $executables; do
   # Set variables containing paths of executables
-  if [ "$executable" != entries_dump ]; then
-    eval "${executable}_path=subversion/$executable/$executable"
-  else
+  eval "${executable}_path=subversion/$executable/$executable"
+  if [ "$executable" = entries_dump ]; then
     eval "${executable}_path=subversion/tests/cmdline/entries-dump"
   fi
+  if [ "$executable" = atomic_ra_revprop_change ]; then
+    eval "${executable}_path=subversion/tests/cmdline/atomic-ra-revprop-change"
+  fi
   # Delete duplicates in dependencies of executables
   executable_dependencies="$(echo -n $(for x in $(eval echo "\$$executable"); do echo $x; done | sort -u))"
   eval "$executable=\$executable_dependencies"

Modified: subversion/branches/performance/notes/http-and-webdav/webdav-protocol
URL: http://svn.apache.org/viewvc/subversion/branches/performance/notes/http-and-webdav/webdav-protocol?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/notes/http-and-webdav/webdav-protocol (original)
+++ subversion/branches/performance/notes/http-and-webdav/webdav-protocol Sun Sep 26 11:58:58 2010
@@ -177,6 +177,42 @@ Response:
   
   ...svn-svndiff stream that can be passed to svn_txdelta_parse_svndiff...
 
+PROPPATCH
+=========
+
+We extend PROPPATCH as follows.  To pass OLD_VALUE_P (as in
+svn_ra_change_rev_prop2()), any propchange which is accompanied by a non-NULL
+OLD_VALUE_P goes within the <D:set><D:prop> tag (and never within the
+<D:remove><D:prop> tag --- even if it is a propdel).  Consequently, in
+mod_dav_svn it would land in db_store() and not db_remove().
+
+The property tag (in the C: or S: namespace) always contains the propval in its
+cdata (potentially base64-encoded).  The extension is as follows:
+
+* The property tag grows a V:absent attribute, to represent that the property
+  is being removed (i.e., a propdel routed to <D:set><D:prop>).
+
+* A <V:old-value> tag may be nested within the property tag.  The nested tag
+  supports the same V:absent and V:encoding attributed as the parent (property)
+  tag.
+
+* To preserve SVN_ERR_FS_PROP_BASEVALUE_MISMATCH (which is part of
+  the API promise), the <D:status>HTTP/1.1 500 (status)</D:status>
+  part of the "207 Multi-Status" response is used.  We transmit in
+  it a "412 Precondition Failed" response, which ra_neon and ra_serf
+  then special-case to interpret SVN_ERR_FS_PROP_BASEVALUE_MISMATCH.
+
+  Someday we will marshal complete svn_error_t chains over the wire
+  in ra_dav, just like ra_svn does (see svn_ra_svn__handle_failure_status()),
+  or at least will preserve the outer apr_err code in more cases.  In the 
+  meantime, using 412 allows us to preserve the SVN_ERR_FS_PROP_BASEVALUE_MISMATCH
+  error code, which is required for implementing svn_ra_change_rev_prop2().
+
+Historical note: we route propdels via <D:set>/db_store() because the mod_dav
+API for db_remove() was insufficient.  See this thread:
+http://mid.gmane.org/4C531CFB.2010202@collab.net
+
+
 Custom REPORTs
 ==============
 

Modified: subversion/branches/performance/notes/subversion-design.html
URL: http://svn.apache.org/viewvc/subversion/branches/performance/notes/subversion-design.html?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/notes/subversion-design.html (original)
+++ subversion/branches/performance/notes/subversion-design.html Sun Sep 26 11:58:58 2010
@@ -2255,7 +2255,7 @@ write/Makefile:6
 
     <p>For a detailed description of exactly how Greg Stein
       <em class="email">gstein@lyra.org</em> is mapping the WebDAV DeltaV spec to
-      Subversion, see his paper: <a href="http://svn.apache.org/repos/asf/subversion/trunk/www/webdav-usage.html">http://svn.apache.org/repos/asf/subversion/trunk/www/webdav-usage.html</a>
+      Subversion, see his paper: <a href="http://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav/webdav-usage.html">http://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav/webdav-usage.html</a>
     </p>
 
     <p>For more information on WebDAV and the DeltaV extensions, see

Modified: subversion/branches/performance/subversion/bindings/javahl/native/BlameCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/BlameCallback.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/BlameCallback.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/BlameCallback.cpp Sun Sep 26 11:58:58 2010
@@ -106,14 +106,14 @@ BlameCallback::singleLine(svn_revnum_t s
     }
 
   // convert the parameters to their Java relatives
-  jobject jrevProps = CreateJ::PropertyMap(revProps, pool);
+  jobject jrevProps = CreateJ::PropertyMap(revProps);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN(SVN_NO_ERROR);
 
   jobject jmergedRevProps = NULL;
   if (mergedRevProps != NULL)
     {
-      jmergedRevProps = CreateJ::PropertyMap(mergedRevProps, pool);
+      jmergedRevProps = CreateJ::PropertyMap(mergedRevProps);
       if (JNIUtil::isJavaExceptionThrown())
         POP_AND_RETURN(SVN_NO_ERROR);
     }

Modified: subversion/branches/performance/subversion/bindings/javahl/native/ClientContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/ClientContext.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/ClientContext.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/ClientContext.cpp Sun Sep 26 11:58:58 2010
@@ -285,7 +285,7 @@ ClientContext::notify(void *baton,
       env->DeleteLocalRef(clazz);
     }
 
-  jobject jInfo = CreateJ::ClientNotifyInformation(notify, pool);
+  jobject jInfo = CreateJ::ClientNotifyInformation(notify);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 

Modified: subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.cpp Sun Sep 26 11:58:58 2010
@@ -671,8 +671,7 @@ CreateJ::Status(svn_wc_context_t *wc_ctx
 }
 
 jobject
-CreateJ::ClientNotifyInformation(const svn_wc_notify_t *wcNotify,
-                                 apr_pool_t *pool)
+CreateJ::ClientNotifyInformation(const svn_wc_notify_t *wcNotify)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
@@ -762,7 +761,7 @@ CreateJ::ClientNotifyInformation(const s
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN_NULL;
 
-  jobject jrevProps = CreateJ::PropertyMap(wcNotify->rev_props, pool);
+  jobject jrevProps = CreateJ::PropertyMap(wcNotify->rev_props);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN_NULL;
 
@@ -791,8 +790,7 @@ CreateJ::ClientNotifyInformation(const s
 }
 
 jobject
-CreateJ::ReposNotifyInformation(const svn_repos_notify_t *reposNotify,
-                                apr_pool_t *pool)
+CreateJ::ReposNotifyInformation(const svn_repos_notify_t *reposNotify)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
@@ -1032,7 +1030,7 @@ CreateJ::StringSet(apr_array_header_t *s
   return CreateJ::Set(jstrs);
 }
 
-jobject CreateJ::PropertyMap(apr_hash_t *prop_hash, apr_pool_t *pool)
+jobject CreateJ::PropertyMap(apr_hash_t *prop_hash)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
@@ -1072,7 +1070,8 @@ jobject CreateJ::PropertyMap(apr_hash_t 
 
   apr_hash_index_t *hi;
   int i = 0;
-  for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi), ++i)
+  for (hi = apr_hash_first(apr_hash_pool_get(prop_hash), prop_hash);
+       hi; hi = apr_hash_next(hi), ++i)
     {
       const char *key;
       svn_string_t *val;

Modified: subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.h (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/CreateJ.h Sun Sep 26 11:58:58 2010
@@ -59,10 +59,10 @@ class CreateJ
          const svn_client_status_t *status, apr_pool_t *pool);
 
   static jobject
-  ClientNotifyInformation(const svn_wc_notify_t *notify, apr_pool_t *pool);
+  ClientNotifyInformation(const svn_wc_notify_t *notify);
 
   static jobject
-  ReposNotifyInformation(const svn_repos_notify_t *notify, apr_pool_t *pool);
+  ReposNotifyInformation(const svn_repos_notify_t *notify);
 
   static jobject
   CommitItem(svn_client_commit_item3_t *item);
@@ -77,7 +77,7 @@ class CreateJ
   StringSet(apr_array_header_t *strings);
 
   static jobject
-  PropertyMap(apr_hash_t *prop_hash, apr_pool_t *pool);
+  PropertyMap(apr_hash_t *prop_hash);
 
   /* This creates a set of Objects.  It derefs the members of the vector
    * after putting them in the set, so they caller doesn't need to. */

Modified: subversion/branches/performance/subversion/bindings/javahl/native/LogMessageCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/LogMessageCallback.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/LogMessageCallback.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/LogMessageCallback.cpp Sun Sep 26 11:58:58 2010
@@ -115,7 +115,7 @@ LogMessageCallback::singleMessage(svn_lo
 
   jobject jrevprops = NULL;
   if (log_entry->revprops != NULL && apr_hash_count(log_entry->revprops) > 0)
-    jrevprops = CreateJ::PropertyMap(log_entry->revprops, pool);
+    jrevprops = CreateJ::PropertyMap(log_entry->revprops);
 
   env->CallVoidMethod(m_callback,
                       sm_mid,

Modified: subversion/branches/performance/subversion/bindings/javahl/native/ProplistCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/ProplistCallback.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/ProplistCallback.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/ProplistCallback.cpp Sun Sep 26 11:58:58 2010
@@ -96,7 +96,7 @@ svn_error_t *ProplistCallback::singlePat
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN(SVN_NO_ERROR);
 
-  jobject jmap = CreateJ::PropertyMap(prop_hash, pool);
+  jobject jmap = CreateJ::PropertyMap(prop_hash);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN(SVN_NO_ERROR);
 

Modified: subversion/branches/performance/subversion/bindings/javahl/native/ReposNotifyCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/ReposNotifyCallback.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/ReposNotifyCallback.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/ReposNotifyCallback.cpp Sun Sep 26 11:58:58 2010
@@ -81,7 +81,7 @@ ReposNotifyCallback::onNotify(const svn_
       env->DeleteLocalRef(clazz);
     }
 
-  jobject jInfo = CreateJ::ReposNotifyInformation(wcNotify, pool);
+  jobject jInfo = CreateJ::ReposNotifyInformation(wcNotify);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 

Modified: subversion/branches/performance/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/native/SVNClient.cpp?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/performance/subversion/bindings/javahl/native/SVNClient.cpp Sun Sep 26 11:58:58 2010
@@ -1408,7 +1408,7 @@ jobject SVNClient::revProperties(const c
                                         &set_rev, ctx, requestPool.pool()),
                 NULL);
 
-    return CreateJ::PropertyMap(props, requestPool.pool());
+    return CreateJ::PropertyMap(props);
 }
 
 struct info_baton

Modified: subversion/branches/performance/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/performance/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Sun Sep 26 11:58:58 2010
@@ -3118,10 +3118,9 @@ public class BasicTests extends SVNTests
                 tcTest.getWc().getItemContent("A/B/E/alpha"));
         tcTest.getWc().setItemWorkingCopyRevision("A/B/F/alpha", 2);
         // we expect the tree conflict to turn the existing item into
-        // a scheduled-add with history.  We expect the modifications in
-        // the local file to have been copied to the new file.
+        // a scheduled-add with history.
         tcTest.getWc().setItemTextStatus("A/B/E/alpha", Status.Kind.added);
-        tcTest.getWc().setItemTextStatus("A/B/F/alpha", Status.Kind.modified);
+        tcTest.getWc().setItemTextStatus("A/B/F/alpha", Status.Kind.normal);
 
         // check the status of the working copy of the tc test
         tcTest.checkStatus();

Modified: subversion/branches/performance/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/performance/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java Sun Sep 26 11:58:58 2010
@@ -3010,10 +3010,9 @@ public class BasicTests extends SVNTests
                 tcTest.getWc().getItemContent("A/B/E/alpha"));
         tcTest.getWc().setItemWorkingCopyRevision("A/B/F/alpha", 2);
         // we expect the tree conflict to turn the existing item into
-        // a scheduled-add with history.  We expect the modifications in
-        // the local file to have been copied to the new file.
+        // a scheduled-add with history.
         tcTest.getWc().setItemTextStatus("A/B/E/alpha", StatusKind.added);
-        tcTest.getWc().setItemTextStatus("A/B/F/alpha", StatusKind.modified);
+        tcTest.getWc().setItemTextStatus("A/B/F/alpha", StatusKind.normal);
 
         // check the status of the working copy of the tc test
         tcTest.checkStatus();

Modified: subversion/branches/performance/subversion/include/mod_dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/mod_dav_svn.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/mod_dav_svn.h (original)
+++ subversion/branches/performance/subversion/include/mod_dav_svn.h Sun Sep 26 11:58:58 2010
@@ -48,8 +48,10 @@ extern "C" {
 
    Three special substrings of the uri are returned for convenience:
 
-   * REPOS_NAME:      The single path component that is the directory
-                      which contains the repository.
+   * REPOS_BASENAME:  The single path component that is the directory
+                      which contains the repository.  (Don't confuse
+                      this with the "repository name" as optionally
+                      defined via the SVNReposName directive!)
 
    * RELATIVE_PATH:   The remaining imaginary path components.
 
@@ -68,7 +70,7 @@ extern "C" {
    ROOT_PATH of '/svn/repos'.  But either way, we would get back:
 
      * CLEANED_URI:    /svn/repos/proj1/!svn/blah/13/A/B/alpha
-     * REPOS_NAME:     proj1
+     * REPOS_BASENAME: proj1
      * RELATIVE_PATH:  /!svn/blah/13/A/B/alpha
      * REPOS_PATH:     A/B/alpha
      * TRAILING_SLASH: FALSE
@@ -78,7 +80,7 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_s
                                                  const char *root_path,
                                                  const char **cleaned_uri,
                                                  int *trailing_slash,
-                                                 const char **repos_name,
+                                                 const char **repos_basename,
                                                  const char **relative_path,
                                                  const char **repos_path);
 

Modified: subversion/branches/performance/subversion/include/private/svn_dav_protocol.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_dav_protocol.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_dav_protocol.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_dav_protocol.h Sun Sep 26 11:58:58 2010
@@ -46,6 +46,17 @@ extern "C" {
 #define SVN_DAV__INCLUDE_DESCENDANTS "include-descendants"
 #define SVN_DAV__VERSION_NAME "version-name"
 
+/** Names of XML elements attributes and tags for svn_ra_change_rev_prop2()'s
+    extension of PROPPATCH.  */
+#define SVN_DAV__OLD_VALUE "old-value"
+#define SVN_DAV__OLD_VALUE__ABSENT "absent"
+
+/** Helper typedef for svn_ra_change_rev_prop2() implementation. */
+typedef struct svn_dav__two_props_t {
+  const svn_string_t *const *old_value_p;
+  const svn_string_t *new_value;
+} svn_dav__two_props_t;
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/performance/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_client.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_client.h (original)
+++ subversion/branches/performance/subversion/include/svn_client.h Sun Sep 26 11:58:58 2010
@@ -3418,17 +3418,34 @@ svn_client_upgrade(const char *dir,
  */
 
 /**
- * Modify a working copy directory @a dir, changing any
- * repository URLs that begin with @a from to begin with @a to instead,
- * recursing into subdirectories if @a recurse is TRUE.
+ * Recursively modify a working copy rooted at @a wcroot_dir, changing any
+ * repository URLs that begin with @a from to begin with @a to instead.
  *
- * @param dir Working copy directory
+ * @param wcroot_dir Working copy root directory
  * @param from Original URL
  * @param to New URL
- * @param recurse Whether to recurse
  * @param ctx svn_client_ctx_t
  * @param pool The pool from which to perform memory allocations
+ *
+ * @since New in 1.7
+ */
+svn_error_t *
+svn_client_relocate2(const char *wcroot_dir,
+                     const char *from,
+                     const char *to,
+                     svn_client_ctx_t *ctx,
+                     apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_relocate2().
+ *
+ * @note As of the 1.7 API, @a dir is required to be a working copy
+ * root directory, and @a recurse is required to be TRUE.
+ *
+ * @deprecated Provided for limited backwards compatibility with the
+ * 1.6 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_relocate(const char *dir,
                     const char *from,
@@ -3437,7 +3454,6 @@ svn_client_relocate(const char *dir,
                     svn_client_ctx_t *ctx,
                     apr_pool_t *pool);
 
-
 /** @} */
 
 /**
@@ -4100,6 +4116,12 @@ svn_client_propset(const char *propname,
  * new value.  (To check that an old value is still non-existent, set
  * @a original_propval->data to NULL, and @a original_propval->len is
  * ignored.)
+ * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
+ * check of @a original_propval is done atomically.
+ *
+ * Note: the representation of "property is not set" in @a
+ * original_propval differs from the representation in other APIs
+ * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
  *
  * If @a force is TRUE, allow newlines in the author property.
  *

Modified: subversion/branches/performance/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_dav.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_dav.h (original)
+++ subversion/branches/performance/subversion/include/svn_dav.h Sun Sep 26 11:58:58 2010
@@ -243,6 +243,12 @@ extern "C" {
 #define SVN_DAV_NS_DAV_SVN_LOG_REVPROPS SVN_DAV_PROP_NS_DAV "svn/log-revprops"
 
 /** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to enforce
+ * old-value atomicity in PROPPATCH (for editing revprops). */
+#define SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS\
+            SVN_DAV_PROP_NS_DAV "svn/atomic-revprops"
+
+/** Presence of this in a DAV header in an OPTIONS response indicates
  * that the transmitter (in this case, the server) knows how to handle
  * a replay of a directory in the repository (not root). */
 #define SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY\

Modified: subversion/branches/performance/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_error.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_error.h (original)
+++ subversion/branches/performance/subversion/include/svn_error.h Sun Sep 26 11:58:58 2010
@@ -193,6 +193,15 @@ svn_error_compose(svn_error_t *chain,
 svn_error_t *
 svn_error_root_cause(svn_error_t *err);
 
+/** Return TRUE if @a err's chain contains the error code @a apr_err.
+ *
+ * If @a err is #SVN_NO_ERROR, return FALSE.
+ *
+ * @since New in 1.7.
+ */
+svn_boolean_t
+svn_error_has_cause(svn_error_t *err, apr_status_t apr_err);
+
 /** Create a new error that is a deep copy of @a err and return it.
  *
  * @since New in 1.2.

Modified: subversion/branches/performance/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_error_codes.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/performance/subversion/include/svn_error_codes.h Sun Sep 26 11:58:58 2010
@@ -219,11 +219,6 @@ SVN_ERROR_START
              SVN_ERR_BAD_CATEGORY_START + 13,
              "Unknown string value of token")
 
-  /** @since New in 1.7. */
-  SVN_ERRDEF(SVN_ERR_BAD_OLD_VALUE,
-             SVN_ERR_BAD_CATEGORY_START + 14,
-             "Old value doesn't match repository")
-
   /* xml errors */
 
   SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
@@ -743,6 +738,12 @@ SVN_ERROR_START
              SVN_ERR_FS_CATEGORY_START + 48,
              "Filesystem has no such checksum-representation index record")
 
+  /** @since New in 1.7. */
+  SVN_ERRDEF(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH,
+             SVN_ERR_FS_CATEGORY_START + 49,
+             "Property value in filesystem differs from the provided "
+             "base value")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,
@@ -1333,12 +1334,12 @@ SVN_ERROR_START
              SVN_ERR_MISC_CATEGORY_START + 32,
              "Unsupported schema found in SQLite db")
 
-/** @since New in 1.7. */
+  /** @since New in 1.7. */
   SVN_ERRDEF(SVN_ERR_SQLITE_BUSY,
              SVN_ERR_MISC_CATEGORY_START + 33,
              "The SQLite db is busy")
 
-/** @since New in 1.7. */
+  /** @since New in 1.7. */
   SVN_ERRDEF(SVN_ERR_SQLITE_RESETTING_FOR_ROLLBACK,
              SVN_ERR_MISC_CATEGORY_START + 34,
              "SQLite busy at transaction rollback; "

Modified: subversion/branches/performance/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_fs.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_fs.h (original)
+++ subversion/branches/performance/subversion/include/svn_fs.h Sun Sep 26 11:58:58 2010
@@ -1894,10 +1894,11 @@ svn_fs_revision_proplist(apr_hash_t **ta
  * - @a fs is a filesystem, and @a rev is the revision in that filesystem
  *   whose property should change.
  * - @a name is the name of the property to change.
- * - if @a old_value_p is not @c NULL, then @a *old_value_p is the expected old
- *   value of the property, and changing the value will fail with error
- *   #SVN_ERR_BAD_OLD_VALUE if the present value of the property is not @a
- *   *old_value_p.  (This is an atomic test-and-set).
+ * - if @a old_value_p is not @c NULL, then changing the property will fail with
+ *   error #SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the present value of the
+ *   property is not @a *old_value_p.  (This is an atomic test-and-set).
+ *   @a *old_value_p may be @c NULL, representing that the property must be not
+ *   already set.
  * - @a value is the new value of the property, or zero if the property should
  *   be removed altogether.
  *

Modified: subversion/branches/performance/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_io.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_io.h (original)
+++ subversion/branches/performance/subversion/include/svn_io.h Sun Sep 26 11:58:58 2010
@@ -248,7 +248,10 @@ svn_io_open_uniquely_named(apr_file_t **
  * be possible to atomically rename the resulting file due to cross-device
  * issues.)
  *
- * The file will be deleted according to @a delete_when.
+ * The file will be deleted according to @a delete_when.  If @a delete_when
+ * is @c svn_io_file_del_on_close and @a file is @c NULL, the file will be
+ * deleted before this function returns.
+ *
  * When passing @c svn_io_file_del_none please don't forget to eventually
  * remove the temporary file to avoid filling up the system temp directory.
  * It is often appropriate to bind the lifetime of the temporary file to

Modified: subversion/branches/performance/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_ra.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_ra.h (original)
+++ subversion/branches/performance/subversion/include/svn_ra.h Sun Sep 26 11:58:58 2010
@@ -746,12 +746,40 @@ svn_ra_get_dated_revision(svn_ra_session
  *
  * If @a value is @c NULL, delete the named revision property.
  *
+ * If the server advertises the #SVN_RA_CAPABILITY_ATOMIC_REVPROPS capability
+ * and @a old_value_p is not @c NULL, then changing the property will fail with
+ * an error chain that contains #SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the
+ * present value of the property is not @a *old_value_p.  (This is an atomic
+ * test-and-set).
+ * @a *old_value_p may be @c NULL, representing that the property must be not
+ * already set.
+ *
+ * If the capability is not advertised, then @a old_value_p MUST be @c NULL.
+ *
  * Please note that properties attached to revisions are @em unversioned.
  *
  * Use @a pool for memory allocation.
  *
+ * @see svn_fs_change_rev_prop2(), svn_error_has_cause().
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra_change_rev_prop2(svn_ra_session_t *session,
+                        svn_revnum_t rev,
+                        const char *name,
+                        const svn_string_t *const *old_value_p,
+                        const svn_string_t *value,
+                        apr_pool_t *pool);
+
+/**
+ * Similar to svn_ra_change_rev_prop2(), but with @a old_value_p set
+ * to @c NULL.
+ *
  * @since New in 1.2.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_ra_change_rev_prop(svn_ra_session_t *session,
                        svn_revnum_t rev,
@@ -1913,6 +1941,14 @@ svn_ra_has_capability(svn_ra_session_t *
  */
 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
 
+/**
+ * The capability of specifying (and atomically verifying) expected
+ * preexisting values when modifying revprops.
+ *
+ * @since New in 1.7.
+ */
+#define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
+
 /*       *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
  *
  * RA layers generally fetch all capabilities when asked about any

Modified: subversion/branches/performance/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_ra_svn.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/performance/subversion/include/svn_ra_svn.h Sun Sep 26 11:58:58 2010
@@ -60,6 +60,8 @@ extern "C" {
 #define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops"
 /* maps to SVN_RA_CAPABILITY_PARTIAL_REPLAY */
 #define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay"
+/* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */
+#define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops"
 
 /** ra_svn passes @c svn_dirent_t fields over the wire as a list of
  * words, these are the values used to represent each field.

Modified: subversion/branches/performance/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_repos.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_repos.h (original)
+++ subversion/branches/performance/subversion/include/svn_repos.h Sun Sep 26 11:58:58 2010
@@ -1994,28 +1994,55 @@ svn_repos_fs_get_locks(apr_hash_t **lock
 /** @} */
 
 /**
- * Like svn_fs_change_rev_prop(), but validate the name and value of the
+ * Like svn_fs_change_rev_prop2(), but validate the name and value of the
  * property and invoke the @a repos's pre- and post-revprop-change hooks
  * around the change as specified by @a use_pre_revprop_change_hook and
  * @a use_post_revprop_change_hook (respectively).
  *
  * @a rev is the revision whose property to change, @a name is the
  * name of the property, and @a new_value is the new value of the
- * property.   @a author is the authenticated username of the person
+ * property.   If @a old_value_p is not @c NULL, then @a *old_value_p
+ * is the expected current (preexisting) value of the property (or @c NULL
+ * for "unset").  @a author is the authenticated username of the person
  * changing the property value, or NULL if not available.
  *
  * If @a authz_read_func is non-NULL, then use it (with @a
  * authz_read_baton) to validate the changed-paths associated with @a
  * rev.  If the revision contains any unreadable changed paths, then
- * return SVN_ERR_AUTHZ_UNREADABLE.
+ * return #SVN_ERR_AUTHZ_UNREADABLE.
  *
  * Validate @a name and @a new_value like the same way
  * svn_repos_fs_change_node_prop() does.
  *
  * Use @a pool for temporary allocations.
  *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_repos_fs_change_rev_prop4(svn_repos_t *repos,
+                              svn_revnum_t rev,
+                              const char *author,
+                              const char *name,
+                              const svn_string_t *const *old_value_p,
+                              const svn_string_t *new_value,
+                              svn_boolean_t
+                              use_pre_revprop_change_hook,
+                              svn_boolean_t
+                              use_post_revprop_change_hook,
+                              svn_repos_authz_func_t
+                              authz_read_func,
+                              void *authz_read_baton,
+                              apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_fs_change_rev_prop4(), but with @a old_value_p always
+ * set to @c NULL.  (In other words, it is similar to
+ * svn_fs_change_rev_prop().)
+ *
+ * @deprecated Provided for backward compatibility with the 1.6 API.
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_repos_fs_change_rev_prop3(svn_repos_t *repos,
                               svn_revnum_t rev,

Modified: subversion/branches/performance/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_wc.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_wc.h (original)
+++ subversion/branches/performance/subversion/include/svn_wc.h Sun Sep 26 11:58:58 2010
@@ -6791,13 +6791,13 @@ typedef svn_error_t *(*svn_wc_relocation
                                                       const char *uuid,
                                                       const char *url);
 
-/** Change repository references at @a local_abspath and all it's children.
- * The pre-change URL should be @a from, and the post-change URL will be
- * @a to.  @a validator (and its baton, @a validator_baton), will be called
- * for the newly generated base URL and calculated repo root.
+/** Recursively change repository references at @a wcroot_abspath
+ * (which is the root directory of a working copy).  The pre-change
+ * URL should be @a from, and the post-change URL will be @a to.  @a
+ * validator (and its baton, @a validator_baton), will be called for
+ * the newly generated base URL and calculated repo root.
  *
- * If @a recurse is @c FALSE, none of the children of @a local_abspath will
- * be changed.  @a wc_ctx is an working copy context.
+ * @a wc_ctx is an working copy context.
  *
  * @a scratch_pool will be used for temporary allocations.
  *
@@ -6805,10 +6805,9 @@ typedef svn_error_t *(*svn_wc_relocation
  */
 svn_error_t *
 svn_wc_relocate4(svn_wc_context_t *wc_ctx,
-                 const char *local_abspath,
+                 const char *wcroot_abspath,
                  const char *from,
                  const char *to,
-                 svn_boolean_t recurse,
                  svn_wc_relocation_validator3_t validator,
                  void *validator_baton,
                  apr_pool_t *scratch_pool);
@@ -6816,8 +6815,12 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
 /** Similar to svn_wc_relocate4(), but with a #svn_wc_adm_access_t /
  * relative path parameter pair.
  *
+ * @note As of the 1.7 API, @a path is required to be a working copy
+ * root directory, and @a recurse is required to be TRUE.
+ *
  * @since New in 1.5.
- * @deprecated Provided for backwards compatibility with the 1.6 API.
+ * @deprecated Provided for limited backwards compatibility with the
+ * 1.6 API.
  */
 SVN_DEPRECATED
 svn_error_t *

Modified: subversion/branches/performance/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/deprecated.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/deprecated.c Sun Sep 26 11:58:58 2010
@@ -2039,3 +2039,18 @@ svn_client_mergeinfo_log_eligible(const 
                                   svn_depth_empty, revprops, ctx,
                                   pool);
 }
+
+/*** From relocate.c ***/
+svn_error_t *
+svn_client_relocate(const char *path,
+                    const char *from,
+                    const char *to,
+                    svn_boolean_t recurse,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *pool)
+{
+  if (! recurse)
+    svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, 0,
+                     _("Non-recursive relocation not supported"));
+  return svn_client_relocate2(path, from, to, ctx, pool);
+}

Modified: subversion/branches/performance/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/externals.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/externals.c Sun Sep 26 11:58:58 2010
@@ -229,8 +229,8 @@ switch_dir_external(const char *path,
                   SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root,
                                                  subpool));
 
-                  err = svn_client_relocate(path, repos_root_url, repos_root,
-                                            TRUE, ctx, subpool);
+                  err = svn_client_relocate2(path, repos_root_url, repos_root,
+                                             ctx, subpool);
                   /* If the relocation failed because the new URL points
                      to another repository, then we need to relegate and
                      check out a new WC. */

Modified: subversion/branches/performance/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/prop_commands.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/prop_commands.c Sun Sep 26 11:58:58 2010
@@ -450,6 +450,53 @@ svn_client_propset4(const char *propname
     }
 }
 
+static svn_error_t *
+check_and_set_revprop(svn_revnum_t *set_rev,
+                      svn_ra_session_t *ra_session,
+                      const char *propname,
+                      const svn_string_t *original_propval,
+                      const svn_string_t *propval,
+                      apr_pool_t *pool)
+{
+  if (original_propval)
+    {
+      /* Ensure old value hasn't changed behind our back. */
+      svn_string_t *current;
+      SVN_ERR(svn_ra_rev_prop(ra_session, *set_rev, propname, &current, pool));
+
+      if (original_propval->data && (! current))
+        {
+          return svn_error_createf(
+                  SVN_ERR_RA_OUT_OF_DATE, NULL,
+                  _("revprop '%s' in r%ld is unexpectedly absent "
+                    "in repository (maybe someone else deleted it?)"),
+                  propname, *set_rev);
+        }
+      else if (original_propval->data
+               && (! svn_string_compare(original_propval, current)))
+        {
+          return svn_error_createf(
+                  SVN_ERR_RA_OUT_OF_DATE, NULL,
+                  _("revprop '%s' in r%ld has unexpected value "
+                    "in repository (maybe someone else changed it?)"),
+                  propname, *set_rev);
+        }
+      else if ((! original_propval->data) && current)
+        {
+          return svn_error_createf(
+                  SVN_ERR_RA_OUT_OF_DATE, NULL,
+                  _("revprop '%s' in r%ld is unexpectedly present "
+                    "in repository (maybe someone else set it?)"),
+                  propname, *set_rev);
+        }
+    }
+
+  SVN_ERR(svn_ra_change_rev_prop2(ra_session, *set_rev, propname, 
+                                  NULL, propval, pool));
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_client_revprop_set2(const char *propname,
                         const svn_string_t *propval,
@@ -462,6 +509,7 @@ svn_client_revprop_set2(const char *prop
                         apr_pool_t *pool)
 {
   svn_ra_session_t *ra_session;
+  svn_boolean_t be_atomic;
 
   if ((strcmp(propname, SVN_PROP_REVISION_AUTHOR) == 0)
       && propval
@@ -485,42 +533,31 @@ svn_client_revprop_set2(const char *prop
   SVN_ERR(svn_client__get_revision_number(set_rev, NULL, ctx->wc_ctx, NULL,
                                           ra_session, revision, pool));
 
-  if (original_propval)
-    {
-      /* Ensure old value hasn't changed behind our back. */
-      svn_string_t *current;
-      SVN_ERR(svn_ra_rev_prop(ra_session, *set_rev, propname, &current, pool));
+  SVN_ERR(svn_ra_has_capability(ra_session, &be_atomic,
+                                SVN_RA_CAPABILITY_ATOMIC_REVPROPS, pool));
+  if (be_atomic)
+    {
+      /* Convert ORIGINAL_PROPVAL to an OLD_VALUE_P. */
+      const svn_string_t *const *old_value_p;
+      const svn_string_t *unset = NULL;
+
+      if (original_propval == NULL)
+      	old_value_p = NULL;
+      else if (original_propval->data == NULL)
+      	old_value_p = &unset;
+      else
+      	old_value_p = &original_propval;
 
-      if (original_propval->data && (! current))
-        {
-          return svn_error_createf(
-                  SVN_ERR_RA_OUT_OF_DATE, NULL,
-                  _("revprop '%s' in r%ld is unexpectedly absent "
-                    "in repository (maybe someone else deleted it?)"),
-                  propname, *set_rev);
-        }
-      else if (original_propval->data
-               && (! svn_string_compare(original_propval, current)))
-        {
-          return svn_error_createf(
-                  SVN_ERR_RA_OUT_OF_DATE, NULL,
-                  _("revprop '%s' in r%ld has unexpected value "
-                    "in repository (maybe someone else changed it?)"),
-                  propname, *set_rev);
-        }
-      else if ((! original_propval->data) && current)
-        {
-          return svn_error_createf(
-                  SVN_ERR_RA_OUT_OF_DATE, NULL,
-                  _("revprop '%s' in r%ld is unexpectedly present "
-                    "in repository (maybe someone else set it?)"),
-                  propname, *set_rev);
-        }
+      /* The actual RA call. */
+      SVN_ERR(svn_ra_change_rev_prop2(ra_session, *set_rev, propname, 
+                                      old_value_p, propval, pool));
+    }
+  else
+    {
+      /* The actual RA call. */
+      SVN_ERR(check_and_set_revprop(set_rev, ra_session, propname,
+                                    original_propval, propval, pool));
     }
-
-  /* The actual RA call. */
-  SVN_ERR(svn_ra_change_rev_prop(ra_session, *set_rev, propname, propval,
-                                 pool));
 
   if (ctx->notify_func2)
     {

Modified: subversion/branches/performance/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/relocate.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/relocate.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/relocate.c Sun Sep 26 11:58:58 2010
@@ -126,24 +126,23 @@ validator_func(void *baton,
 }
 
 svn_error_t *
-svn_client_relocate(const char *path,
-                    const char *from,
-                    const char *to,
-                    svn_boolean_t recurse,
-                    svn_client_ctx_t *ctx,
-                    apr_pool_t *pool)
+svn_client_relocate2(const char *wcroot_dir,
+                     const char *from,
+                     const char *to,
+                     svn_client_ctx_t *ctx,
+                     apr_pool_t *pool)
 {
   struct validator_baton_t vb;
   const char *local_abspath;
 
-  /* Now, populate our validator callback baton, and call the relocate code. */
+  /* Populate our validator callback baton, and call the relocate code. */
   vb.ctx = ctx;
-  vb.path = path;
+  vb.path = wcroot_dir;
   vb.url_uuids = apr_array_make(pool, 1, sizeof(struct url_uuid_t));
   vb.pool = pool;
 
-  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
-  SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from, to, recurse,
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, wcroot_dir, pool));
+  SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from, to,
                            validator_func, &vb, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/performance/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_diff/parse-diff.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/performance/subversion/libsvn_diff/parse-diff.c Sun Sep 26 11:58:58 2010
@@ -752,8 +752,8 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
 static int
 compare_hunks(const void *a, const void *b)
 {
-  const svn_diff_hunk_t *ha = *((const svn_diff_hunk_t **)a);
-  const svn_diff_hunk_t *hb = *((const svn_diff_hunk_t **)b);
+  const svn_diff_hunk_t *ha = *((const svn_diff_hunk_t *const *)a);
+  const svn_diff_hunk_t *hb = *((const svn_diff_hunk_t *const *)b);
 
   if (ha->original_start < hb->original_start)
     return -1;

Modified: subversion/branches/performance/subversion/libsvn_fs/access.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs/access.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs/access.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs/access.c Sun Sep 26 11:58:58 2010
@@ -87,7 +87,7 @@ svn_fs_access_add_lock_token2(svn_fs_acc
                               const char *token)
 {
   apr_hash_set(access_ctx->lock_tokens,
-               token, APR_HASH_KEY_STRING, (void *) path);
+               token, APR_HASH_KEY_STRING, path);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/performance/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_base/revs-txns.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs_base/revs-txns.c Sun Sep 26 11:58:58 2010
@@ -270,7 +270,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
               && !svn_string_compare(wanted_value, present_value)))
         {
           /* What we expected isn't what we found. */
-          return svn_error_createf(SVN_ERR_BAD_OLD_VALUE, NULL,
+          return svn_error_createf(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, NULL,
                                    _("revprop '%s' has unexpected value in "
                                      "filesystem"),
                                    name);

Modified: subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c Sun Sep 26 11:58:58 2010
@@ -7663,7 +7663,7 @@ change_rev_prop_body(void *baton, apr_po
               && !svn_string_compare(wanted_value, present_value)))
         {
           /* What we expected isn't what we found. */
-          return svn_error_createf(SVN_ERR_BAD_OLD_VALUE, NULL,
+          return svn_error_createf(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, NULL,
                                    _("revprop '%s' has unexpected value in "
                                      "filesystem"),
                                    cb->name);

Modified: subversion/branches/performance/subversion/libsvn_ra/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra/deprecated.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra/deprecated.c Sun Sep 26 11:58:58 2010
@@ -196,6 +196,15 @@ svn_error_t *svn_ra_open(svn_ra_session_
                       config, pool);
 }
 
+svn_error_t *svn_ra_change_rev_prop(svn_ra_session_t *session,
+                                    svn_revnum_t rev,
+                                    const char *name,
+                                    const svn_string_t *value,
+                                    apr_pool_t *pool)
+{
+  return svn_ra_change_rev_prop2(session, rev, name, NULL, value, pool);
+}
+
 svn_error_t *svn_ra_get_commit_editor2(svn_ra_session_t *session,
                                        const svn_delta_editor_t **editor,
                                        void **edit_baton,

Modified: subversion/branches/performance/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra/ra_loader.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra/ra_loader.c Sun Sep 26 11:58:58 2010
@@ -612,14 +612,37 @@ svn_error_t *svn_ra_get_dated_revision(s
   return session->vtable->get_dated_revision(session, revision, tm, pool);
 }
 
-svn_error_t *svn_ra_change_rev_prop(svn_ra_session_t *session,
-                                    svn_revnum_t rev,
-                                    const char *name,
-                                    const svn_string_t *value,
-                                    apr_pool_t *pool)
+svn_error_t *svn_ra_change_rev_prop2(svn_ra_session_t *session,
+                                     svn_revnum_t rev,
+                                     const char *name,
+                                     const svn_string_t *const *old_value_p,
+                                     const svn_string_t *value,
+                                     apr_pool_t *pool)
 {
   SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(rev));
-  return session->vtable->change_rev_prop(session, rev, name, value, pool);
+
+  /* If an old value was specified, make sure the server supports
+   * specifying it. */
+  if (old_value_p)
+    {
+      svn_boolean_t has_atomic_revprops;
+
+      SVN_ERR(svn_ra_has_capability(session, &has_atomic_revprops,
+                                    SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
+                                    pool));
+
+      if (!has_atomic_revprops)
+        /* API violation.  (Should be an ASSERT, but gstein talked me
+         * out of it.) */
+        return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                                 _("Specifying 'old_value_p' is not allowed when "
+                                   "the '%s' capability is not advertised, and "
+                                   "could indicate a bug in your client"),
+                                   SVN_RA_CAPABILITY_ATOMIC_REVPROPS);
+    }
+
+  return session->vtable->change_rev_prop(session, rev, name,
+                                          old_value_p, value, pool);
 }
 
 svn_error_t *svn_ra_rev_proplist(svn_ra_session_t *session,

Modified: subversion/branches/performance/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra/ra_loader.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/performance/subversion/libsvn_ra/ra_loader.h Sun Sep 26 11:58:58 2010
@@ -77,6 +77,7 @@ typedef struct svn_ra__vtable_t {
   svn_error_t *(*change_rev_prop)(svn_ra_session_t *session,
                                   svn_revnum_t rev,
                                   const char *name,
+                                  const svn_string_t *const *old_value_p,
                                   const svn_string_t *value,
                                   apr_pool_t *pool);
 

Modified: subversion/branches/performance/subversion/libsvn_ra/wrapper_template.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra/wrapper_template.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra/wrapper_template.h (original)
+++ subversion/branches/performance/subversion/libsvn_ra/wrapper_template.h Sun Sep 26 11:58:58 2010
@@ -127,7 +127,7 @@ static svn_error_t *compat_change_rev_pr
                                            const svn_string_t *value,
                                            apr_pool_t *pool)
 {
-  return VTBL.change_rev_prop(session_baton, rev, propname, value, pool);
+  return VTBL.change_rev_prop(session_baton, rev, propname, NULL, value, pool);
 }
 
 static svn_error_t *compat_rev_proplist(void *session_baton,

Modified: subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c Sun Sep 26 11:58:58 2010
@@ -563,14 +563,16 @@ static svn_error_t *
 svn_ra_local__change_rev_prop(svn_ra_session_t *session,
                               svn_revnum_t rev,
                               const char *name,
+                              const svn_string_t *const *old_value_p,
                               const svn_string_t *value,
                               apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
+
   SVN_ERR(get_username(session, pool));
-  return svn_repos_fs_change_rev_prop3(sess->repos, rev, sess->username,
-                                       name, value, TRUE, TRUE, NULL, NULL,
-                                       pool);
+  return svn_repos_fs_change_rev_prop4(sess->repos, rev, sess->username,
+                                       name, old_value_p, value, TRUE, TRUE,
+                                       NULL, NULL, pool);
 }
 
 static svn_error_t *
@@ -1389,7 +1391,8 @@ svn_ra_local__has_capability(svn_ra_sess
   if (strcmp(capability, SVN_RA_CAPABILITY_DEPTH) == 0
       || strcmp(capability, SVN_RA_CAPABILITY_LOG_REVPROPS) == 0
       || strcmp(capability, SVN_RA_CAPABILITY_PARTIAL_REPLAY) == 0
-      || strcmp(capability, SVN_RA_CAPABILITY_COMMIT_REVPROPS) == 0)
+      || strcmp(capability, SVN_RA_CAPABILITY_COMMIT_REVPROPS) == 0
+      || strcmp(capability, SVN_RA_CAPABILITY_ATOMIC_REVPROPS) == 0)
     {
       *has = TRUE;
     }

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/commit.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/commit.c Sun Sep 26 11:58:58 2010
@@ -616,7 +616,8 @@ static svn_error_t * do_proppatch(svn_ra
     }
 
   return svn_ra_neon__do_proppatch(ras, url, rb->prop_changes,
-                                   rb->prop_deletes, extra_headers, pool);
+                                   rb->prop_deletes, NULL, extra_headers,
+                                   pool);
 }
 
 
@@ -1416,7 +1417,7 @@ static svn_error_t * apply_revprops(comm
     return err;
 
   return svn_ra_neon__do_proppatch(cc->ras, vcc_rsrc.wr_url, revprop_table,
-                                   NULL, NULL, pool);
+                                   NULL, NULL, NULL, pool);
 }
 
 svn_error_t * svn_ra_neon__get_commit_editor(svn_ra_session_t *session,

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/fetch.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/fetch.c Sun Sep 26 11:58:58 2010
@@ -1122,6 +1122,7 @@ svn_error_t *svn_ra_neon__get_latest_rev
 svn_error_t *svn_ra_neon__change_rev_prop(svn_ra_session_t *session,
                                           svn_revnum_t rev,
                                           const char *name,
+                                          const svn_string_t *const *old_value_p,
                                           const svn_string_t *value,
                                           apr_pool_t *pool)
 {
@@ -1130,12 +1131,24 @@ svn_error_t *svn_ra_neon__change_rev_pro
   svn_error_t *err;
   apr_hash_t *prop_changes = NULL;
   apr_array_header_t *prop_deletes = NULL;
+  apr_hash_t *prop_old_values = NULL;
   static const ne_propname wanted_props[] =
     {
       { "DAV:", "auto-version" },
       { NULL }
     };
 
+  if (old_value_p)
+    {
+      svn_boolean_t capable;
+      SVN_ERR(svn_ra_neon__has_capability(session, &capable,
+                                          SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
+                                          pool));
+
+      /* How did you get past the same check in svn_ra_change_rev_prop2()? */
+      SVN_ERR_ASSERT(capable);
+    }
+
   /* Main objective: do a PROPPATCH (allprops) on a baseline object */
 
   /* ### A Word From Our Sponsor:  see issue #916.
@@ -1165,19 +1178,33 @@ svn_error_t *svn_ra_neon__change_rev_pro
          to attempt the PROPPATCH if the deltaV server is going to do
          auto-versioning and create a new baseline! */
 
-  if (value)
+  if (old_value_p)
     {
-      prop_changes = apr_hash_make(pool);
-      apr_hash_set(prop_changes, name, APR_HASH_KEY_STRING, value);
+      svn_dav__two_props_t *both_values;
+
+      both_values = apr_palloc(pool, sizeof(*both_values));
+      both_values->old_value_p = old_value_p;
+      both_values->new_value = value;
+
+      prop_old_values = apr_hash_make(pool);
+      apr_hash_set(prop_old_values, name, APR_HASH_KEY_STRING, both_values);
     }
   else
     {
-      prop_deletes = apr_array_make(pool, 1, sizeof(const char *));
-      APR_ARRAY_PUSH(prop_deletes, const char *) = name;
+      if (value)
+        {
+          prop_changes = apr_hash_make(pool);
+          apr_hash_set(prop_changes, name, APR_HASH_KEY_STRING, value);
+        }
+      else
+        {
+          prop_deletes = apr_array_make(pool, 1, sizeof(const char *));
+          APR_ARRAY_PUSH(prop_deletes, const char *) = name;
+        }
     }
 
   err = svn_ra_neon__do_proppatch(ras, baseline->url, prop_changes,
-                                  prop_deletes, NULL, pool);
+                                  prop_deletes, prop_old_values, NULL, pool);
   if (err)
     return
       svn_error_create

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/options.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/options.c Sun Sep 26 11:58:58 2010
@@ -152,6 +152,8 @@ parse_capabilities(ne_request *req,
                APR_HASH_KEY_STRING, capability_no);
   apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_LOG_REVPROPS,
                APR_HASH_KEY_STRING, capability_no);
+  apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
+               APR_HASH_KEY_STRING, capability_no);
 
   /* Then find out which ones are supported. */
   val = ne_get_response_header(req, "dav");
@@ -199,6 +201,10 @@ parse_capabilities(ne_request *req,
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_LOG_REVPROPS,
                      APR_HASH_KEY_STRING, capability_yes);
 
+      if (svn_cstring_match_glob_list(SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS, vals))
+        apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
+                     APR_HASH_KEY_STRING, capability_yes);
+
       if (svn_cstring_match_glob_list(SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY,
                                       vals))
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_PARTIAL_REPLAY,

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/props.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/props.c Sun Sep 26 11:58:58 2010
@@ -1075,12 +1075,14 @@ get_encoding_and_cdata(const char **enco
 static svn_error_t *
 append_setprop(svn_stringbuf_t *body,
                const char *name,
+               const svn_string_t *const *old_value_p,
                const svn_string_t *value,
                apr_pool_t *pool)
 {
   const char *encoding;
   const char *xml_safe;
   const char *xml_tag_name;
+  const char *old_value_tag;
 
   /* Map property names to namespaces */
 #define NSLEN (sizeof(SVN_PROP_PREFIX) - 1)
@@ -1094,11 +1096,45 @@ append_setprop(svn_stringbuf_t *body,
       xml_tag_name = apr_pstrcat(pool, "C:", name, NULL);
     }
 
-  SVN_ERR(get_encoding_and_cdata(&encoding, &xml_safe, value, pool));
+  if (old_value_p)
+    {
+      if (*old_value_p)
+        {
+          const char *encoding2;
+          const char *xml_safe2;
+          SVN_ERR(get_encoding_and_cdata(&encoding2, &xml_safe2,
+                                         *old_value_p, pool));
+          old_value_tag = apr_psprintf(pool, "<%s %s>%s</%s>",
+                                       "V:" SVN_DAV__OLD_VALUE, encoding2,
+                                       xml_safe2, "V:" SVN_DAV__OLD_VALUE);
+        }
+      else
+        {
+#define OLD_VALUE_ABSENT_TAG \
+          "<" "V:" SVN_DAV__OLD_VALUE \
+              " V:" SVN_DAV__OLD_VALUE__ABSENT "=\"1\" " \
+          "/>"
+          old_value_tag = OLD_VALUE_ABSENT_TAG;
+        }
+    }
+  else
+    {
+      old_value_tag = "";
+    }
+
+  if (old_value_p && !value)
+    {
+      encoding = "V:" SVN_DAV__OLD_VALUE__ABSENT "=\"1\"" ;
+      xml_safe = "";
+    }
+  else
+    {
+      SVN_ERR(get_encoding_and_cdata(&encoding, &xml_safe, value, pool));
+    }
 
   svn_stringbuf_appendcstr(body,
-                           apr_psprintf(pool,"<%s %s>%s</%s>",
-                                        xml_tag_name, encoding,
+                           apr_psprintf(pool,"<%s %s>%s%s</%s>",
+                                        xml_tag_name, encoding, old_value_tag,
                                         xml_safe, xml_tag_name));
   return SVN_NO_ERROR;
 }
@@ -1109,6 +1145,7 @@ svn_ra_neon__do_proppatch(svn_ra_neon__s
                           const char *url,
                           apr_hash_t *prop_changes,
                           const apr_array_header_t *prop_deletes,
+                          apr_hash_t *prop_old_values,
                           apr_hash_t *extra_headers,
                           apr_pool_t *pool)
 {
@@ -1118,7 +1155,8 @@ svn_ra_neon__do_proppatch(svn_ra_neon__s
 
   /* just punt if there are no changes to make. */
   if ((prop_changes == NULL || (! apr_hash_count(prop_changes)))
-      && (prop_deletes == NULL || prop_deletes->nelts == 0))
+      && (prop_deletes == NULL || prop_deletes->nelts == 0)
+      && (prop_old_values == NULL || (! apr_hash_count(prop_old_values))))
     return SVN_NO_ERROR;
 
   /* easier to roll our own PROPPATCH here than use ne_proppatch(), which
@@ -1130,6 +1168,22 @@ svn_ra_neon__do_proppatch(svn_ra_neon__s
      SVN_DAV_PROP_NS_CUSTOM "\" xmlns:S=\""
      SVN_DAV_PROP_NS_SVN "\">" DEBUG_CR, pool);
 
+  /* Handle property changes/deletions with expected old values. */
+  if (prop_old_values)
+    {
+      apr_hash_index_t *hi;
+      svn_stringbuf_appendcstr(body, "<D:set><D:prop>");
+      for (hi = apr_hash_first(pool, prop_old_values); hi; hi = apr_hash_next(hi))
+        {
+          const char *name = svn__apr_hash_index_key(hi);
+          svn_dav__two_props_t *both_values = svn__apr_hash_index_val(hi);
+          svn_pool_clear(subpool);
+          SVN_ERR(append_setprop(body, name, both_values->old_value_p,
+                                 both_values->new_value, subpool));
+        }
+      svn_stringbuf_appendcstr(body, "</D:prop></D:set>");
+    }
+
   /* Handle property changes. */
   if (prop_changes)
     {
@@ -1141,7 +1195,7 @@ svn_ra_neon__do_proppatch(svn_ra_neon__s
           void *val;
           svn_pool_clear(subpool);
           apr_hash_this(hi, &key, NULL, &val);
-          SVN_ERR(append_setprop(body, key, val, subpool));
+          SVN_ERR(append_setprop(body, key, NULL, val, subpool));
         }
       svn_stringbuf_appendcstr(body, "</D:prop></D:set>");
     }
@@ -1155,7 +1209,7 @@ svn_ra_neon__do_proppatch(svn_ra_neon__s
         {
           const char *name = APR_ARRAY_IDX(prop_deletes, n, const char *);
           svn_pool_clear(subpool);
-          SVN_ERR(append_setprop(body, name, NULL, subpool));
+          SVN_ERR(append_setprop(body, name, NULL, NULL, subpool));
         }
       svn_stringbuf_appendcstr(body, "</D:prop></D:remove>");
     }

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h Sun Sep 26 11:58:58 2010
@@ -254,6 +254,7 @@ svn_error_t *svn_ra_neon__get_dated_revi
 svn_error_t *svn_ra_neon__change_rev_prop(svn_ra_session_t *session,
                                           svn_revnum_t rev,
                                           const char *name,
+                                          const svn_string_t *const *old_value_p,
                                           const svn_string_t *value,
                                           apr_pool_t *pool);
 
@@ -575,12 +576,15 @@ svn_error_t *svn_ra_neon__get_vcc(const 
 /* Issue a PROPPATCH request on URL, transmitting PROP_CHANGES (a hash
    of const svn_string_t * values keyed on Subversion user-visible
    property names) and PROP_DELETES (an array of property names to
-   delete).  Send any extra request headers in EXTRA_HEADERS. Use POOL
-   for all allocations.  */
+   delete). PROP_OLD_VALUES is a hash of Subversion user-visible property
+   names mapped to svn_dav__two_props_t * values. Send any extra
+   request headers in EXTRA_HEADERS. Use POOL for all allocations.
+ */
 svn_error_t *svn_ra_neon__do_proppatch(svn_ra_neon__session_t *ras,
                                        const char *url,
                                        apr_hash_t *prop_changes,
                                        const apr_array_header_t *prop_deletes,
+                                       apr_hash_t *prop_old_values,
                                        apr_hash_t *extra_headers,
                                        apr_pool_t *pool);
 

Modified: subversion/branches/performance/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_ra_neon/util.c?rev=1001417&r1=1001416&r2=1001417&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/performance/subversion/libsvn_ra_neon/util.c Sun Sep 26 11:58:58 2010
@@ -167,6 +167,7 @@ typedef struct
   svn_ra_neon__request_t *req;
   svn_stringbuf_t *description;
   svn_boolean_t contains_error;
+  svn_boolean_t contains_precondition_error;
 } multistatus_baton_t;
 
 /* Implements svn_ra_neon__startelm_cb_t. */
@@ -231,6 +232,9 @@ end_207_element(void *baton, int state,
             return svn_error_create(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
                                     _("The request response contained at least "
                                       "one error"));
+          else if (b->contains_precondition_error) 
+            return svn_error_create(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, NULL,
+                                    b->description->data);
           else
             return svn_error_create(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
                                     b->description->data);
@@ -260,6 +264,10 @@ end_207_element(void *baton, int state,
             else
               b->propstat_has_error = (status.klass != 2);
 
+            /* Handle "412 Precondition Failed" specially */
+            if (status.code == 412)
+              b->contains_precondition_error = TRUE;
+
             free(status.reason_phrase);
           }
         else