You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/09/21 16:14:14 UTC

svn commit: r999427 [1/3] - in /subversion/branches/atomic-revprop: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/tigris/subversion/javahl/ subversion/bindings/java...

Author: danielsh
Date: Tue Sep 21 14:14:12 2010
New Revision: 999427

URL: http://svn.apache.org/viewvc?rev=999427&view=rev
Log:
On the atomic-revprops branch, merge r997405 through r999390 from trunk,
excluding some revisions that had been merged manually earlier.

Added:
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/copy-from-previous-version-and-modify.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-from-previous-version-and-modify.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/copy-parent-modify-prop.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-parent-modify-prop.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/modified-in-place.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/modified-in-place.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/move-and-modify.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/move-and-modify.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/no-author.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/no-author.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/revprops.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/revprops.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/tag-empty-trunk.dump
      - copied unchanged from r998879, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/tag-empty-trunk.dump
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests_data/url-encoding-bug.dump
      - copied unchanged from r999157, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/url-encoding-bug.dump
Modified:
    subversion/branches/atomic-revprop/   (props changed)
    subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.h
    subversion/branches/atomic-revprop/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
    subversion/branches/atomic-revprop/subversion/include/private/svn_sqlite.h
    subversion/branches/atomic-revprop/subversion/include/svn_client.h
    subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h
    subversion/branches/atomic-revprop/subversion/include/svn_wc.h
    subversion/branches/atomic-revprop/subversion/libsvn_client/checkout.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/cleanup.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/client.h
    subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/list.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/switch.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/update.c
    subversion/branches/atomic-revprop/subversion/libsvn_diff/parse-diff.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/editorp.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/ra_svn.h
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.h
    subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c
    subversion/branches/atomic-revprop/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/atomic-revprop/subversion/svn/upgrade-cmd.c
    subversion/branches/atomic-revprop/subversion/svnrdump/dump_editor.c
    subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c
    subversion/branches/atomic-revprop/subversion/svnserve/serve.c
    subversion/branches/atomic-revprop/subversion/svnsync/main.c
    subversion/branches/atomic-revprop/subversion/tests/cmdline/authz_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/copy_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/resolve_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/resolved_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/update_tests.py
    subversion/branches/atomic-revprop/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/atomic-revprop/subversion/tests/libsvn_wc/entries-compat.c

Propchange: subversion/branches/atomic-revprop/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 14:14:12 2010
@@ -37,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:965046-997404,998880,999158,999375,999391
+/subversion/trunk:965046-999425

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp Tue Sep 21 14:14:12 2010
@@ -33,6 +33,7 @@
 #include "Pool.h"
 #include "Targets.h"
 #include "Revision.h"
+#include "OutputStream.h"
 #include "RevisionRange.h"
 #include "BlameCallback.h"
 #include "ProplistCallback.h"
@@ -1093,43 +1094,9 @@ SVNClient::diffSummarize(const char *tar
                                                requestPool.pool()), );
 }
 
-jbyteArray SVNClient::fileContent(const char *path, Revision &revision,
-                                  Revision &pegRevision)
-{
-    SVN::Pool requestPool;
-    SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-    Path intPath(path);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
-
-    size_t size = 0;
-    svn_stream_t *read_stream = createReadStream(requestPool.pool(),
-                                                 intPath.c_str(), revision,
-                                                 pegRevision, size);
-    if (read_stream == NULL)
-        return NULL;
-
-    JNIEnv *env = JNIUtil::getEnv();
-    // size will be set to the number of bytes available.
-    jbyteArray jcontent = env->NewByteArray(size);
-    if (JNIUtil::isJavaExceptionThrown())
-        return NULL;
-
-    jbyte *jbytes = env->GetByteArrayElements(jcontent, NULL);
-    if (JNIUtil::isJavaExceptionThrown())
-        return NULL;
-
-    svn_error_t *err = svn_stream_read(read_stream, (char *) jbytes, &size);
-    env->ReleaseByteArrayElements(jcontent, jbytes, 0);
-    SVN_JNI_ERR(err, NULL);
-    if (JNIUtil::isJavaExceptionThrown())
-        return NULL;
-
-    return jcontent;
-}
-
 void SVNClient::streamFileContent(const char *path, Revision &revision,
-                                  Revision &pegRevision, jobject outputStream,
-                                  size_t bufSize)
+                                  Revision &pegRevision,
+                                  OutputStream &outputStream)
 {
     SVN::Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
@@ -1137,101 +1104,14 @@ void SVNClient::streamFileContent(const 
     SVN_JNI_ERR(intPath.error_occured(), );
 
     JNIEnv *env = JNIUtil::getEnv();
-    jclass outputStreamClass = env->FindClass("java/io/OutputStream");
-    if (outputStreamClass == NULL)
-        return;
-
-    jmethodID writeMethod = env->GetMethodID(outputStreamClass, "write",
-                                             "([BII)V");
-    if (writeMethod == NULL)
-        return;
-
-    // Create the buffer.
-    jbyteArray buffer = env->NewByteArray(bufSize);
-    if (JNIUtil::isJavaExceptionThrown())
-        return;
-
-    jbyte *bufData = env->GetByteArrayElements(buffer, NULL);
-    if (JNIUtil::isJavaExceptionThrown())
-        return;
-
-    size_t contentSize = 0;
-    svn_stream_t *read_stream = createReadStream(requestPool.pool(), path,
-                                                 revision, pegRevision,
-                                                 contentSize);
-    if (read_stream == NULL)
+    svn_client_ctx_t *ctx = context.getContext(NULL);
+    if (ctx == NULL)
         return;
 
-    while (contentSize > 0)
-    {
-        size_t readSize = bufSize > contentSize ? contentSize : bufSize;
-        svn_error_t *err;
-
-        err = svn_stream_read(read_stream, (char *)bufData, &readSize);
-        if (err != NULL)
-        {
-            env->ReleaseByteArrayElements(buffer, bufData, 0);
-            svn_stream_close(read_stream);
-            SVN_JNI_ERR(err, );
-        }
-
-        env->ReleaseByteArrayElements(buffer, bufData, JNI_COMMIT);
-        env->CallVoidMethod(outputStream, writeMethod, buffer, 0, readSize);
-        if (JNIUtil::isJavaExceptionThrown())
-        {
-            env->ReleaseByteArrayElements(buffer, bufData, 0);
-            svn_stream_close(read_stream);
-            return;
-        }
-        contentSize -= readSize;
-    }
-
-    env->ReleaseByteArrayElements(buffer, bufData, 0);
-    return;
-}
-
-svn_stream_t *SVNClient::createReadStream(apr_pool_t *pool, const char *path,
-                                          Revision &revision,
-                                          Revision &pegRevision, size_t &size)
-{
-    svn_stream_t *read_stream = NULL;
-
-    if (revision.revision()->kind == svn_opt_revision_working)
-    {
-        // We want the working copy. Going back to the server returns
-        // base instead (which is not what we want).
-        apr_file_t *file = NULL;
-        apr_finfo_t finfo;
-        apr_status_t apr_err = apr_stat(&finfo, path, APR_FINFO_MIN, pool);
-        if (apr_err)
-        {
-            JNIUtil::handleAPRError(apr_err, _("open file"));
-            return NULL;
-        }
-        apr_err = apr_file_open(&file, path, APR_READ, 0, pool);
-        if (apr_err)
-        {
-            JNIUtil::handleAPRError(apr_err, _("open file"));
-            return NULL;
-        }
-        read_stream = svn_stream_from_aprfile2(file, TRUE, pool);
-        size = finfo.size;
-    }
-    else
-    {
-        svn_client_ctx_t *ctx = context.getContext(NULL);
-        if (ctx == NULL)
-            return NULL;
-
-        svn_stringbuf_t *buf = svn_stringbuf_create("", pool);
-        read_stream = svn_stream_from_stringbuf(buf, pool);
-        SVN_JNI_ERR(svn_client_cat2(read_stream, path, pegRevision.revision(),
-                                    revision.revision(), ctx, pool),
-                    NULL);
-        size = buf->len;
-    }
-
-    return read_stream;
+    SVN_JNI_ERR(svn_client_cat2(outputStream.getStream(requestPool),
+                                path, pegRevision.revision(),
+                                revision.revision(), ctx, requestPool.pool()),
+                );
 }
 
 jbyteArray SVNClient::revProperty(const char *path,

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.h Tue Sep 21 14:14:12 2010
@@ -47,6 +47,7 @@ class InfoCallback;
 class CommitCallback;
 class ListCallback;
 class StatusCallback;
+class OutputStream;
 class PatchCallback;
 class ChangelistCallback;
 class CommitMessage;
@@ -75,11 +76,8 @@ class SVNClient :public SVNBase
              BlameCallback *callback);
   void relocate(const char *from, const char *to, const char *path,
                 bool recurse);
-  jbyteArray fileContent(const char *path, Revision &revision,
-                         Revision &pegRevision);
   void streamFileContent(const char *path, Revision &revision,
-                         Revision &pegRevision, jobject outputStream,
-                         size_t bufSize);
+                         Revision &pegRevision, OutputStream &outputStream);
   void propertySet(const char *path, const char *name, const char *value,
                    svn_depth_t depth, StringArray &changelists, bool force,
                    RevpropTable &revprops, CommitCallback *callback);
@@ -199,9 +197,6 @@ class SVNClient :public SVNBase
   SVNClient(jobject jthis_in);
   virtual ~SVNClient();
  private:
-  svn_stream_t *createReadStream(apr_pool_t *pool, const char *path,
-                                 Revision &revision, Revision &pegRevision,
-                                 size_t &size);
   /**
    * Shared implementation for diff() APIs. When pegRevision is
    * provided, revision1 and revision2 equate to startRevision and

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Sep 21 14:14:12 2010
@@ -32,6 +32,7 @@
 #include "SVNClient.h"
 #include "Revision.h"
 #include "RevisionRange.h"
+#include "OutputStream.h"
 #include "EnumMapper.h"
 #include "CommitMessage.h"
 #include "Prompter.h"
@@ -1309,37 +1310,10 @@ Java_org_apache_subversion_javahl_SVNCli
                     jignoreAncestry ? true : false, receiver);
 }
 
-JNIEXPORT jbyteArray JNICALL
-Java_org_apache_subversion_javahl_SVNClient_fileContent
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision)
-{
-  JNIEntry(SVNClient, fileContent);
-  SVNClient *cl = SVNClient::getCppObject(jthis);
-  if (cl == NULL)
-    {
-      JNIUtil::throwError(_("bad C++ this"));
-      return NULL;
-    }
-  JNIStringHolder path(jpath);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
-
-  Revision revision(jrevision);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
-
-  Revision pegRevision(jpegRevision);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
-
-  return cl->fileContent(path, revision, pegRevision);
-}
-
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_streamFileContent
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision, jint bufSize, jobject jstream)
+ jobject jpegRevision, jobject jstream)
 {
   JNIEntry(SVNClient, streamFileContent);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1360,7 +1334,11 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->streamFileContent(path, revision, pegRevision, jstream, bufSize);
+  OutputStream dataOut(jstream);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  cl->streamFileContent(path, revision, pegRevision, dataOut);
 }
 
 JNIEXPORT jstring JNICALL

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Sep 21 14:14:12 2010
@@ -790,7 +790,7 @@ public interface ISVNClient
      * @since 1.0
      */
     void streamFileContent(String path, Revision revision, Revision pegRevision,
-                           int bufferSize, OutputStream stream)
+                           OutputStream stream)
         throws ClientException;
 
     /**

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Tue Sep 21 14:14:12 2010
@@ -26,6 +26,7 @@ package org.apache.subversion.javahl;
 import org.apache.subversion.javahl.callback.*;
 
 import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
 
 import java.util.Collection;
 import java.util.Set;
@@ -473,15 +474,21 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.2
      */
-    public native byte[] fileContent(String path, Revision revision,
-                                     Revision pegRevision)
-            throws ClientException;
+    public byte[] fileContent(String path, Revision revision,
+                              Revision pegRevision)
+            throws ClientException
+    {
+        ByteArrayOutputStream stream = new ByteArrayOutputStream();
+
+        streamFileContent(path, revision, pegRevision, stream);
+        return stream.toByteArray();
+    }
 
     /**
      * @since 1.0
      */
     public native void streamFileContent(String path, Revision revision,
-                                         Revision pegRevision, int bufferSize,
+                                         Revision pegRevision,
                                          OutputStream stream)
             throws ClientException;
 

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java Tue Sep 21 14:14:12 2010
@@ -2105,7 +2105,7 @@ public class SVNClient implements SVNCli
             aSVNClient.streamFileContent(path,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          bufferSize, stream);
+                          stream);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Tue Sep 21 14:14:12 2010
@@ -1827,7 +1827,7 @@ public class BasicTests extends SVNTests
         // get the content from the repository
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         client.streamFileContent(thisTest.getWCPath() + "/A/mu", null, null,
-                                 100, baos);
+                                 baos);
 
         byte[] content = baos.toByteArray();
         byte[] testContent = thisTest.getWc().getItemContent("A/mu").getBytes();
@@ -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/atomic-revprop/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java Tue Sep 21 14:14:12 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/atomic-revprop/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/private/svn_sqlite.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/private/svn_sqlite.h Tue Sep 21 14:14:12 2010
@@ -165,7 +165,7 @@ svn_sqlite__prepare(svn_sqlite__stmt_t *
 svn_error_t *
 svn_sqlite__bindf(svn_sqlite__stmt_t *stmt, const char *fmt, ...);
 
-/* Error-handling wrapper around sqlite3_bind_int64. */
+/* Error-handling wrapper around sqlite3_bind_int. */
 svn_error_t *
 svn_sqlite__bind_int(svn_sqlite__stmt_t *stmt, int slot, int val);
 

Modified: subversion/branches/atomic-revprop/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_client.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_client.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_client.h Tue Sep 21 14:14:12 2010
@@ -316,6 +316,22 @@ svn_client_get_ssl_client_cert_pw_prompt
 /** @} */
 
 /**
+ * Revisions and Peg Revisions
+ *
+ * @defgroup clnt_revisions Revisions and Peg Revisions
+ *
+ * A brief word on operative and peg revisions.
+ *
+ * If the kind of the peg revision is #svn_opt_revision_unspecified, then it
+ * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working
+ * for local paths.
+ *
+ * For deeper insight, please see the
+ * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html">
+ * Peg and Operative Revisions</a> section of the Subversion Book.
+ */
+
+/**
  * Commit operations
  *
  * @defgroup clnt_commit Client commit subsystem
@@ -881,7 +897,7 @@ typedef struct svn_client_ctx_t
   void *cancel_baton;
 
   /** notification function, defaulting to a function that forwards
-   * to notify_func().
+   * to notify_func().  If @a NULL, it will not be invoked.
    * @since New in 1.2. */
   svn_wc_notify_func2_t notify_func2;
 
@@ -1028,56 +1044,47 @@ svn_client_args_to_target_array(apr_arra
 
 
 /**
- * Checkout a working copy of @a URL at @a revision, looked up at @a
- * peg_revision, using @a path as the root directory of the newly
- * checked out working copy, and authenticating with the
- * authentication baton cached in @a ctx.  If @a result_rev is not @c
- * NULL, set @a *result_rev to the value of the revision actually
- * checked out from the repository.
- *
- * If @a peg_revision->kind is #svn_opt_revision_unspecified, then it
- * defaults to #svn_opt_revision_head.
- *
- * @a revision must be of kind #svn_opt_revision_number,
- * #svn_opt_revision_head, or #svn_opt_revision_date.  If
- * @a revision does not meet these requirements, return the error
- * #SVN_ERR_CLIENT_BAD_REVISION.
- *
- * If @a depth is #svn_depth_infinity, check out fully recursively.
- * Else if it is #svn_depth_immediates, check out @a URL and its
- * immediate entries (subdirectories will be present, but will be at
- * depth #svn_depth_empty themselves); else #svn_depth_files,
- * check out @a URL and its file entries, but no subdirectories; else
- * if #svn_depth_empty, check out @a URL as an empty directory at
- * that depth, with no entries present.
- *
- * If @a depth is #svn_depth_unknown, then behave as if for
- * #svn_depth_infinity, except in the case of resuming a previous
- * checkout of @a path (i.e., updating), in which case use the depth
- * of the existing working copy.
- *
- * If @a ignore_externals is set, don't process externals definitions
- * as part of this operation.
- *
- * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
- * @a ctx->notify_baton2 as the checkout progresses.
- *
- * If @a allow_unver_obstructions is TRUE then the checkout tolerates
- * existing unversioned items that obstruct added paths from @a URL.  Only
- * obstructions of the same type (file or dir) as the added item are
- * tolerated.  The text of obstructing files is left as-is, effectively
- * treating it as a user modification after the checkout.  Working
- * properties of obstructing items are set equal to the base properties.
- * If @a allow_unver_obstructions is FALSE then the checkout will abort
- * if there are any unversioned obstructing items.
- *
- * If @a URL refers to a file rather than a directory, return the
- * error #SVN_ERR_UNSUPPORTED_FEATURE.  If @a URL does not exist,
- * return the error #SVN_ERR_RA_ILLEGAL_URL.
+ * Checkout a working copy from a repository.
  *
- * Use @a pool for any temporary allocation.
+ * @param[out] result_rev   If non-NULL, the value of the revision checked
+ *              out form the repository.
+ * @param[in] URL       The repository URL of the checkout source.
+ * @param[in] path      The root of the new working copy.
+ * @param[in] peg_revision  The peg revision.
+ * @param[in] revision  The operative revision.
+ * @param[in] depth     The depth of the operation.  If #svn_depth_unknown,
+ *              then behave as if for #svn_depth_infinity, except in the case
+ *              of resuming a previous checkout of @a path (i.e., updating),
+ *              in which case use the depth of the existing working copy.
+ * @param[in] ignore_externals  If @c TRUE, don't process externals
+ *              definitions as part of this operation.
+ * @param[in] allow_unver_obstructions  If @c TRUE, then tolerate existing
+ *              unversioned items that obstruct incoming paths.  Only
+ *              obstructions of the same type (file or dir) as the added
+ *              item are tolerated.  The text of obstructing files is left
+ *              as-is, effectively treating it as a user modification after
+ *              the checkout.  Working properties of obstructing items are
+ *              set equal to the base properties. <br>
+ *              If @c FALSE, then abort if there are any unversioned
+ *              obstructing items.
+ * @param[in] ctx   The standard client context, used for authentication and
+ *              notification.
+ * @param[in] pool  Used for any temporary allocation.
+ *
+ * @return A pointer to an #svn_error_t of the type (this list is not
+ *         exhaustive): <br>
+ *         #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
+ *         than a directory; <br>
+ *         #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
+ *         #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
+ *         #svn_opt_revision_number, #svn_opt_revision_head, or
+ *         #svn_opt_revision_date. <br>
+ *         If no error occurred, return #SVN_NO_ERROR.
  *
  * @since New in 1.5.
+ *
+ * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
+ *      a discussion of operative and peg revisions.
  */
 svn_error_t *
 svn_client_checkout3(svn_revnum_t *result_rev,
@@ -4690,26 +4697,30 @@ svn_client_ls(apr_hash_t **dirents,
  */
 
 /**
- * Output the content of file identified by @a path_or_url and @a
- * revision to the stream @a out.  The actual node revision selected
- * is determined by the path as it exists in @a peg_revision.  If @a
- * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
- * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
- * for WC targets.
+ * Output the content of a file.
  *
- * If @a path_or_url is not a local path, then if @a revision is of
- * kind #svn_opt_revision_previous (or some other kind that requires
- * a local path), an error will be returned, because the desired
- * revision cannot be determined.
- *
- * Use the authentication baton cached in @a ctx to authenticate against the
- * repository.
- *
- * Perform all allocations from @a pool.
- *
- * ### @todo Add an expansion/translation flag?
+ * @param[in] out           The stream to which the content will be written.
+ * @param[in] path_or_url   The path or URL of the file.
+ * @param[in] peg_revision  The peg revision.
+ * @param[in] revision  The operative revision.
+ * @param[in] ctx   The standard client context, used for possible
+ *                  authentication.
+ * @param[in] pool  Used for any temporary allocation.
+ *
+ * @todo Add an expansion/translation flag?
+ *
+ * @return A pointer to an #svn_error_t of the type (this list is not
+ *         exhaustive): <br>
+ *         An unspecified error if @a revision is of kind
+ *         #svn_opt_revision_previous (or some other kind that requires
+ *         a local path), because the desired revision cannot be
+ *         determined. <br>
+ *         If no error occurred, return #SVN_NO_ERROR.
  *
  * @since New in 1.2.
+ *
+ * @see #svn_client_ctx_t <br> @ref clnt_revisions for
+ *      a discussion of operative and peg revisions.
  */
 svn_error_t *
 svn_client_cat2(svn_stream_t *out,

Modified: subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h Tue Sep 21 14:14:12 2010
@@ -1334,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/atomic-revprop/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_wc.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_wc.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_wc.h Tue Sep 21 14:14:12 2010
@@ -1258,10 +1258,12 @@ typedef struct svn_wc_notify_t {
    * hunk the notification is for. They are line-based
    * offsets and lengths parsed from the unidiff hunk header.
    * @since New in 1.7. */
+  /* @{ */
   svn_linenum_t hunk_original_start;
   svn_linenum_t hunk_original_length;
   svn_linenum_t hunk_modified_start;
   svn_linenum_t hunk_modified_length;
+  /* @} */
 
   /** The line at which a hunk was matched (and applied).
    * @since New in 1.7. */
@@ -5365,10 +5367,6 @@ svn_wc_get_actual_target(const char *pat
  * whenever external changes are encountered, giving the callback a chance
  * to store the external information for processing.
  *
- * If @a fetch_func is non-NULL, then use it (with @a fetch_baton) as
- * a fallback for retrieving repository files whenever 'copyfrom' args
- * are sent into editor->add_file().
- *
  * If @a diff3_cmd is non-NULL, then use it as the diff3 command for
  * any merging; otherwise, use the built-in merge code.
  *
@@ -5419,8 +5417,6 @@ svn_wc_get_update_editor4(const svn_delt
                           svn_boolean_t allow_unver_obstructions,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_get_file_t fetch_func,
-                          void *fetch_baton,
                           svn_wc_conflict_resolver_func_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
@@ -5434,7 +5430,8 @@ svn_wc_get_update_editor4(const svn_delt
 
 /** Similar to svn_wc_get_update_editor4, but uses access batons and relative
  * path instead of a working copy context-abspath pair and
- * svn_wc_traversal_info_t instead of an externals callback.
+ * svn_wc_traversal_info_t instead of an externals callback.  Also, 
+ * @a fetch_func and @a fetch_baton are ignored.
  *
  * If @a ti is non-NULL, record traversal info in @a ti, for use by
  * post-traversal accessors such as svn_wc_edited_externals().
@@ -5546,8 +5543,6 @@ svn_wc_get_switch_editor4(const svn_delt
                           svn_boolean_t allow_unver_obstructions,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_get_file_t fetch_func,
-                          void *fetch_baton,
                           svn_wc_conflict_resolver_func_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
@@ -5561,8 +5556,7 @@ svn_wc_get_switch_editor4(const svn_delt
 
 /** Similar to svn_wc_get_switch_editor4, but uses access batons and relative
  * path instead of a working copy context and svn_wc_traversal_info_t instead
- * of an externals callback. This function doesn't support an external file
- * fetcher.
+ * of an externals callback.
  *
  * If @a ti is non-NULL, record traversal info in @a ti, for use by
  * post-traversal accessors such as svn_wc_edited_externals().

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/checkout.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/checkout.c Tue Sep 21 14:14:12 2010
@@ -71,10 +71,11 @@ initialize_area(svn_revnum_t *result_rev
                              repos_root, uuid, revnum, depth, pool));
   /* Have update fix the incompleteness. */
   return svn_error_return(svn_client__update_internal(result_rev, local_abspath,
-                                    revision, depth, TRUE, ignore_externals,
-                                    allow_unver_obstructions,
-                                    use_sleep, FALSE, innercheckout,
-                                    ctx, pool));
+                                                      revision, depth, TRUE,
+                                                      ignore_externals,
+                                                      allow_unver_obstructions,
+                                                      use_sleep, innercheckout,
+                                                      ctx, pool));
 }
 
 
@@ -219,7 +220,7 @@ svn_client__checkout_internal(svn_revnum
                                                 revision, depth, TRUE,
                                                 ignore_externals,
                                                 allow_unver_obstructions,
-                                                use_sleep, FALSE, innercheckout,
+                                                use_sleep, innercheckout,
                                                 ctx, pool);
             }
           else

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/cleanup.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/cleanup.c Tue Sep 21 14:14:12 2010
@@ -129,6 +129,11 @@ svn_client_upgrade(const char *path,
   info_baton.last_repos = NULL;
   info_baton.last_uuid = NULL;
 
+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
   SVN_ERR(svn_wc_upgrade(ctx->wc_ctx, local_abspath,
                          fetch_repos_info, &info_baton,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/client.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/client.h (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/client.h Tue Sep 21 14:14:12 2010
@@ -490,12 +490,6 @@ svn_client__make_local_parents(const cha
    that obstruct items added from the repos are tolerated; if FALSE,
    these obstructions cause the update to fail.
 
-   If SEND_COPYFROM_ARGS is true, then request that the server not
-   send file contents when adding files that have been created by
-   explicit copying; instead, just send copyfrom-args to add_file(),
-   and possibly follow up with an apply_textdelta() against the copied
-   file.
-
    If INNERUPDATE is true, no anchor check is performed on the update target.
 */
 svn_error_t *
@@ -507,7 +501,6 @@ svn_client__update_internal(svn_revnum_t
                             svn_boolean_t ignore_externals,
                             svn_boolean_t allow_unver_obstructions,
                             svn_boolean_t *timestamp_sleep,
-                            svn_boolean_t send_copyfrom_args,
                             svn_boolean_t innerupdate,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c Tue Sep 21 14:14:12 2010
@@ -205,7 +205,7 @@ switch_dir_external(const char *path,
                                                   revision, svn_depth_unknown,
                                                   FALSE, FALSE, FALSE,
                                                   timestamp_sleep, TRUE,
-                                                  TRUE, ctx, subpool));
+                                                  ctx, subpool));
               svn_pool_destroy(subpool);
               return SVN_NO_ERROR;
             }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/list.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/list.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/list.c Tue Sep 21 14:14:12 2010
@@ -63,14 +63,23 @@ get_dir_contents(apr_uint32_t dirent_fie
   apr_hash_t *tmpdirents;
   apr_pool_t *iterpool = svn_pool_create(pool);
   apr_array_header_t *array;
+  svn_error_t *err;
   int i;
 
   if (depth == svn_depth_empty)
     return SVN_NO_ERROR;
 
-  /* Get the directory's entries, but not its props. */
-  SVN_ERR(svn_ra_get_dir2(ra_session, &tmpdirents, NULL, NULL,
-                          dir, rev, dirent_fields, pool));
+  /* Get the directory's entries, but not its props.  Ignore any
+     not-authorized errors.  */
+  err = svn_ra_get_dir2(ra_session, &tmpdirents, NULL, NULL,
+                        dir, rev, dirent_fields, pool);
+  if (err && ((err->apr_err == SVN_ERR_RA_NOT_AUTHORIZED) ||
+              (err->apr_err == SVN_ERR_RA_DAV_FORBIDDEN)))
+    {
+      svn_error_clear(err);
+      return SVN_NO_ERROR;
+    }
+  SVN_ERR(err);
 
   if (ctx->cancel_func)
     SVN_ERR(ctx->cancel_func(ctx->cancel_baton));

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c Tue Sep 21 14:14:12 2010
@@ -862,59 +862,41 @@ match_hunk(svn_boolean_t *matched, targe
                                            NULL, FALSE,
                                            content_info->keywords, FALSE,
                                            iterpool));
-      lines_read++;
       SVN_ERR(read_line(content_info, &target_line, iterpool, iterpool));
-      if (! hunk_eof)
+
+      lines_read++;
+
+      /* If the last line doesn't have a newline, we get EOF but still
+       * have a non-empty line to compare. */
+      if ((hunk_eof && hunk_line->len == 0) ||
+          (content_info->eof && strlen(target_line) == 0))
+        break;
+
+      /* Leading/trailing fuzzy lines always match. */
+      if ((lines_read <= fuzz && leading_context > fuzz) ||
+          (lines_read > hunk_length - fuzz && trailing_context > fuzz))
+        lines_matched = TRUE;
+      else
         {
-          if (lines_read <= fuzz && leading_context > fuzz)
-            lines_matched = TRUE;
-          else if (lines_read > hunk_length - fuzz &&
-                   trailing_context > fuzz)
-            lines_matched = TRUE;
-          else
+          if (ignore_whitespace)
             {
-              if (ignore_whitespace)
-                {
-                  char *stripped_hunk_line = apr_pstrdup(pool,
-                                                         hunk_line_translated);
-                  char *stripped_target_line = apr_pstrdup(pool, target_line);
-
-                  apr_collapse_spaces(stripped_hunk_line,
-                                      hunk_line_translated);
-                  apr_collapse_spaces(stripped_target_line, target_line);
-                  lines_matched = ! strcmp(stripped_hunk_line,
-                                           stripped_target_line);
-                }
-              else 
-                lines_matched = ! strcmp(hunk_line_translated, target_line);
+              char *hunk_line_trimmed;
+              char *target_line_trimmed;
+
+              hunk_line_trimmed = apr_pstrdup(iterpool, hunk_line_translated);
+              target_line_trimmed = apr_pstrdup(iterpool, target_line);
+              apr_collapse_spaces(hunk_line_trimmed, hunk_line_trimmed);
+              apr_collapse_spaces(target_line_trimmed, target_line_trimmed);
+              lines_matched = ! strcmp(hunk_line_trimmed, target_line_trimmed);
             }
+          else
+            lines_matched = ! strcmp(hunk_line_translated, target_line);
         }
     }
-  while (lines_matched && ! (hunk_eof || content_info->eof));
+  while (lines_matched);
+
+  *matched = lines_matched && hunk_eof && hunk_line->len == 0;
 
-  if (hunk_eof)
-    *matched = lines_matched;
-  else if (content_info->eof)
-    {
-      /* If the target has no newline at end-of-file, we get an EOF
-       * indication for the target earlier than we do get it for the hunk. */
-      if (match_modified)
-        SVN_ERR(svn_diff_hunk_readline_modified_text(hunk, &hunk_line,
-                                                     NULL, &hunk_eof,
-                                                     iterpool, iterpool));
-      else
-        SVN_ERR(svn_diff_hunk_readline_original_text(hunk, &hunk_line,
-                                                     NULL, &hunk_eof,
-                                                     iterpool, iterpool));
-
-      /* When comparing modified text we require that all lines match, else
-       * a hunk that adds a newline at the end will be treated as already
-       * applied even if it isn't. */
-      if (! match_modified && hunk_line->len == 0 && hunk_eof)
-        *matched = lines_matched;
-      else
-        *matched = FALSE;
-    }
   SVN_ERR(seek_to_line(content_info, saved_line, iterpool));
 
   svn_pool_destroy(iterpool);
@@ -1160,54 +1142,55 @@ get_hunk_info(hunk_info_t **hi, patch_ta
   else if (original_start > 0 && content_info->stream)
     {
       svn_linenum_t saved_line = content_info->current_line;
-      svn_linenum_t modified_start;
 
-      /* Check if the hunk is already applied.
-       * We only check for an exact match here, and don't bother checking
-       * for already applied patches with offset/fuzz, because such a
-       * check would be ambiguous. */
-      if (fuzz == 0)
+      /* Scan for a match at the line where the hunk thinks it
+       * should be going. */
+      SVN_ERR(seek_to_line(content_info, original_start, scratch_pool));
+      if (content_info->current_line != original_start)
         {
-          modified_start = svn_diff_hunk_get_modified_start(hunk);
-          if (modified_start == 0)
-            {
-              /* Patch wants to delete the file. */
-              already_applied = target->locally_deleted;
-            }
-          else
-            {
-              SVN_ERR(seek_to_line(content_info, modified_start,
-                                   scratch_pool));
-              SVN_ERR(scan_for_match(&matched_line, content_info,
-                                     hunk, TRUE,
-                                     modified_start + 1,
-                                     fuzz, ignore_whitespace, TRUE,
-                                     cancel_func, cancel_baton,
-                                     scratch_pool));
-              already_applied = (matched_line == modified_start);
-            }
+          /* Seek failed. */
+          matched_line = 0;
         }
       else
-        already_applied = FALSE;
+        SVN_ERR(scan_for_match(&matched_line, content_info, hunk, TRUE,
+                               original_start + 1, fuzz,
+                               ignore_whitespace, FALSE,
+                               cancel_func, cancel_baton,
+                               scratch_pool));
 
-      if (! already_applied)
+      if (matched_line != original_start)
         {
-          /* Scan for a match at the line where the hunk thinks it
-           * should be going. */
-          SVN_ERR(seek_to_line(content_info, original_start, scratch_pool));
-          if (content_info->current_line != original_start)
+          /* Check if the hunk is already applied.
+           * We only check for an exact match here, and don't bother checking
+           * for already applied patches with offset/fuzz, because such a
+           * check would be ambiguous. */
+          if (fuzz == 0)
             {
-              /* Seek failed. */
-              matched_line = 0;
+              svn_linenum_t modified_start;
+
+              modified_start = svn_diff_hunk_get_modified_start(hunk);
+              if (modified_start == 0)
+                {
+                  /* Patch wants to delete the file. */
+                  already_applied = target->locally_deleted;
+                }
+              else
+                {
+                  SVN_ERR(seek_to_line(content_info, modified_start,
+                                       scratch_pool));
+                  SVN_ERR(scan_for_match(&matched_line, content_info,
+                                         hunk, TRUE,
+                                         modified_start + 1,
+                                         fuzz, ignore_whitespace, TRUE,
+                                         cancel_func, cancel_baton,
+                                         scratch_pool));
+                  already_applied = (matched_line == modified_start);
+                }
             }
           else
-            SVN_ERR(scan_for_match(&matched_line, content_info, hunk, TRUE,
-                                   original_start + 1, fuzz,
-                                   ignore_whitespace, FALSE,
-                                   cancel_func, cancel_baton,
-                                   scratch_pool));
+            already_applied = FALSE;
 
-          if (matched_line != original_start)
+          if (! already_applied)
             {
               /* Scan the whole file again from the start. */
               SVN_ERR(seek_to_line(content_info, 1, scratch_pool));

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/switch.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/switch.c Tue Sep 21 14:14:12 2010
@@ -190,7 +190,6 @@ switch_internal(svn_revnum_t *result_rev
                                     depth,
                                     depth_is_sticky, allow_unver_obstructions,
                                     diff3_cmd, preserved_exts,
-                                    NULL, NULL,
                                     ctx->conflict_func, ctx->conflict_baton,
                                     svn_client__external_info_gatherer, &efb,
                                     ctx->cancel_func, ctx->cancel_baton,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/update.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/update.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/update.c Tue Sep 21 14:14:12 2010
@@ -45,49 +45,6 @@
 /*** Code. ***/
 
 
-/* Context baton for file_fetcher below. */
-struct ff_baton
-{
-  svn_client_ctx_t *ctx;       /* client context used to open ra session */
-  const char *repos_root;      /* repository root URL */
-  svn_ra_session_t *session;   /* the secondary ra session itself */
-  apr_pool_t *pool;            /* the pool where the ra session is allocated */
-};
-
-
-/* Implementation of svn_wc_get_file_t.  A feeble callback wrapper
-   around svn_ra_get_file(), so that the update_editor can use it to
-   fetch any file, any time. */
-static svn_error_t *
-file_fetcher(void *baton,
-             const char *path,
-             svn_revnum_t revision,
-             svn_stream_t *stream,
-             svn_revnum_t *fetched_rev,
-             apr_hash_t **props,
-             apr_pool_t *pool)
-{
-  struct ff_baton *ffb = (struct ff_baton *)baton;
-  const char *dirpath, *base_name, *session_url, *old_session_url;
-
-  svn_relpath_split(&dirpath, &base_name, path, pool);
-  session_url = svn_path_url_add_component2(ffb->repos_root, 
-                                            dirpath, pool);
-
-  if (ffb->session)
-    SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ffb->session,
-                                              session_url, ffb->pool));
-  else
-    SVN_ERR(svn_client__open_ra_session_internal(&(ffb->session), NULL,
-                                                 session_url, NULL, NULL,
-                                                 FALSE, TRUE,
-                                                 ffb->ctx, ffb->pool));
-
-  return svn_ra_get_file(ffb->session, base_name, revision, stream,
-                         fetched_rev, props, pool);
-}
-
-
 static svn_error_t *
 update_internal(svn_revnum_t *result_rev,
                 const char *local_abspath,
@@ -98,7 +55,6 @@ update_internal(svn_revnum_t *result_rev
                 svn_boolean_t ignore_externals,
                 svn_boolean_t allow_unver_obstructions,
                 svn_boolean_t *timestamp_sleep,
-                svn_boolean_t send_copyfrom_args,
                 svn_boolean_t innerupdate,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool)
@@ -120,7 +76,6 @@ update_internal(svn_revnum_t *result_rev
   svn_ra_session_t *ra_session;
   const char *preserved_exts_str;
   apr_array_header_t *preserved_exts;
-  struct ff_baton *ffb;
   svn_client__external_func_baton_t efb;
   svn_boolean_t server_supports_depth;
   svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
@@ -216,12 +171,6 @@ update_internal(svn_revnum_t *result_rev
      a strict sense, however.) */
   SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
 
-  /* Build a baton for the file-fetching callback. */
-  ffb = apr_pcalloc(pool, sizeof(*ffb));
-  ffb->ctx = ctx;
-  ffb->repos_root = repos_root;
-  ffb->pool = pool;
-
   /* Build a baton for the externals-info-gatherer callback. */
   efb.externals_new = apr_hash_make(pool);
   efb.externals_old = apr_hash_make(pool);
@@ -235,7 +184,6 @@ update_internal(svn_revnum_t *result_rev
                                     target, use_commit_times, depth,
                                     depth_is_sticky, allow_unver_obstructions,
                                     diff3_cmd, preserved_exts,
-                                    file_fetcher, ffb,
                                     ctx->conflict_func, ctx->conflict_baton,
                                     svn_client__external_info_gatherer, &efb,
                                     ctx->cancel_func, ctx->cancel_baton,
@@ -244,12 +192,8 @@ update_internal(svn_revnum_t *result_rev
 
   /* Tell RA to do an update of URL+TARGET to REVISION; if we pass an
      invalid revnum, that means RA will use the latest revision.  */
-  SVN_ERR(svn_ra_do_update2(ra_session,
-                            &reporter, &report_baton,
-                            revnum,
-                            target,
-                            depth,
-                            send_copyfrom_args,
+  SVN_ERR(svn_ra_do_update2(ra_session, &reporter, &report_baton,
+                            revnum, target, depth, FALSE,
                             update_editor, update_edit_baton, pool));
 
   SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
@@ -321,7 +265,6 @@ svn_client__update_internal(svn_revnum_t
                             svn_boolean_t ignore_externals,
                             svn_boolean_t allow_unver_obstructions,
                             svn_boolean_t *timestamp_sleep,
-                            svn_boolean_t send_copyfrom_args,
                             svn_boolean_t innerupdate,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
@@ -343,8 +286,7 @@ svn_client__update_internal(svn_revnum_t
   err = update_internal(result_rev, local_abspath, anchor_abspath,
                          revision, depth, depth_is_sticky,
                          ignore_externals, allow_unver_obstructions,
-                         timestamp_sleep, send_copyfrom_args,
-                         innerupdate, ctx, pool);
+                         timestamp_sleep, innerupdate, ctx, pool);
 
   err = svn_error_compose_create(
             err,
@@ -398,7 +340,7 @@ svn_client_update3(apr_array_header_t **
                                             revision, depth, depth_is_sticky,
                                             ignore_externals,
                                             allow_unver_obstructions,
-                                            &sleep, TRUE, FALSE, ctx, subpool);
+                                            &sleep, FALSE, ctx, subpool);
 
           if (err && err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
             {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_diff/parse-diff.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_diff/parse-diff.c Tue Sep 21 14:14:12 2010
@@ -183,7 +183,6 @@ parse_range(svn_linenum_t *start, svn_li
 /* Try to parse a hunk header in string HEADER, putting parsed information
  * into HUNK. Return TRUE if the header parsed correctly. ATAT is the
  * character string used to delimit the hunk header.
- * If REVERSE is TRUE, invert the hunk header while parsing it.
  * Do all allocations in POOL. */
 static svn_boolean_t
 parse_hunk_header(const char *header, svn_diff_hunk_t *hunk,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c Tue Sep 21 14:14:12 2010
@@ -90,7 +90,7 @@ typedef struct {
   replay_info_t *parent;
 } prop_info_t;
 
-typedef struct {
+typedef struct replay_context_t {
   apr_pool_t *src_rev_pool;
   apr_pool_t *dst_rev_pool;
 
@@ -118,6 +118,10 @@ typedef struct {
   /* Cached report target url */
   const char *report_target;
 
+  /* Target and revision to fetch revision properties on */
+  const char *revprop_target;
+  svn_revnum_t revprop_rev;
+
   /* Revision properties for this revision. */
   apr_hash_t *revs_props;
   apr_hash_t *props;
@@ -125,6 +129,9 @@ typedef struct {
   /* Keep a reference to the XML parser ctx to report any errors. */
   svn_ra_serf__xml_parser_t *parser_ctx;
 
+  /* The propfind for the revision properties of the current revision */
+  svn_ra_serf__propfind_context_t *prop_ctx;
+
 } replay_context_t;
 
 
@@ -180,11 +187,15 @@ start_replay(svn_ra_serf__xml_parser_t *
     {
       push_state(parser, ctx, REPORT);
 
+      /* Before we can continue, we need the revision properties. */
+      SVN_ERR_ASSERT(!ctx->prop_ctx
+                     || svn_ra_serf__propfind_is_done(ctx->prop_ctx));
+
       /* Create a pool for the commit editor. */
       ctx->dst_rev_pool = svn_pool_create(ctx->src_rev_pool);
       ctx->props = apr_hash_make(ctx->dst_rev_pool);
-      SVN_ERR(svn_ra_serf__walk_all_props(ctx->revs_props, ctx->report_target,
-                                          ctx->revision,
+      SVN_ERR(svn_ra_serf__walk_all_props(ctx->revs_props, ctx->revprop_target,
+                                          ctx->revprop_rev,
                                           svn_ra_serf__set_bare_props,
                                           ctx->props, ctx->dst_rev_pool));
       if (ctx->revstart_func)
@@ -751,13 +762,30 @@ svn_ra_serf__replay_range(svn_ra_session
           /* Request all properties of a certain revision. */
           replay_ctx->report_target = report_target;
           replay_ctx->revs_props = apr_hash_make(replay_ctx->src_rev_pool);
+
+          if (SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session))
+           {
+             replay_ctx->revprop_target = apr_psprintf(pool, "%s/%ld",
+                                                       session->rev_stub, rev);
+             replay_ctx->revprop_rev = SVN_INVALID_REVNUM;
+            }
+          else
+            {
+              replay_ctx->revprop_target = report_target;
+              replay_ctx->revprop_rev = rev;
+            }
+
           SVN_ERR(svn_ra_serf__deliver_props(&prop_ctx,
                                              replay_ctx->revs_props, session,
-                                             session->conns[0], report_target,
-                                             rev,  "0", all_props,
+                                             session->conns[0],
+                                             replay_ctx->revprop_target,
+                                             replay_ctx->revprop_rev,
+                                             "0", all_props,
                                              TRUE, NULL,
                                              replay_ctx->src_rev_pool));
 
+          replay_ctx->prop_ctx = prop_ctx;
+
           /* Send the replay report request. */
           handler = apr_pcalloc(replay_ctx->src_rev_pool, sizeof(*handler));
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/util.c Tue Sep 21 14:14:12 2010
@@ -1106,7 +1106,7 @@ svn_ra_serf__handle_multistatus_only(ser
           server_err->parser.cdata = cdata_207;
           server_err->parser.done = &ctx->done;
           server_err->parser.ignore_errors = TRUE;
-    }
+        }
       else
         {
           ctx->done = TRUE;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/editorp.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/editorp.c Tue Sep 21 14:14:12 2010
@@ -904,7 +904,9 @@ svn_error_t *svn_ra_svn_drive_editor2(sv
               svn_error_clear(editor->abort_edit(edit_baton, subpool));
               svn_ra_svn__set_block_handler(conn, blocked_write, &state);
             }
-          write_err = svn_ra_svn_write_cmd_failure(conn, subpool, err->child);
+          write_err = svn_ra_svn_write_cmd_failure(
+                          conn, subpool,
+                          svn_ra_svn__locate_real_error_child(err));
           if (!write_err)
             write_err = svn_ra_svn_flush(conn, subpool);
           svn_ra_svn__set_block_handler(conn, NULL, NULL);

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/marshal.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/marshal.c Tue Sep 21 14:14:12 2010
@@ -832,6 +832,21 @@ svn_error_t *svn_ra_svn_parse_proplist(c
 
 /* --- READING AND WRITING COMMANDS AND RESPONSES --- */
 
+svn_error_t *svn_ra_svn__locate_real_error_child(svn_error_t *err)
+{
+  svn_error_t *this_link;
+
+  SVN_ERR_ASSERT(err);
+
+  for (this_link = err;
+       this_link && (this_link->apr_err == SVN_ERR_RA_SVN_CMD_ERR);
+       this_link = this_link->child)
+    ;
+
+  SVN_ERR_ASSERT(this_link);
+  return this_link;
+}
+
 svn_error_t *svn_ra_svn__handle_failure_status(const apr_array_header_t *params,
                                                apr_pool_t *pool)
 {
@@ -860,12 +875,27 @@ svn_error_t *svn_ra_svn__handle_failure_
          easily change that, so "" means a nonexistent message. */
       if (!*message)
         message = NULL;
-      err = svn_error_create((apr_status_t)apr_err, err, message);
-      err->file = apr_pstrdup(err->pool, file);
-      err->line = (long)line;
+      
+      /* Skip over links in the error chain that were intended only to
+         exist on the server (to wrap real errors intended for the
+         client) but accidentally got included in the server's actual
+         response. */
+      if ((apr_status_t)apr_err != SVN_ERR_RA_SVN_CMD_ERR)
+        {
+          err = svn_error_create((apr_status_t)apr_err, err, message);
+          err->file = apr_pstrdup(err->pool, file);
+          err->line = (long)line;
+        }
     }
 
   svn_pool_destroy(subpool);
+
+  /* If we get here, then we failed to find a real error in the error
+     chain that the server proported to be sending us.  That's bad. */
+  if (! err)
+    err = svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
+                           _("Malformed error list"));
+    
   return err;
 }
 
@@ -941,7 +971,9 @@ svn_error_t *svn_ra_svn_handle_commands2
 
       if (err && err->apr_err == SVN_ERR_RA_SVN_CMD_ERR)
         {
-          write_err = svn_ra_svn_write_cmd_failure(conn, iterpool, err->child);
+          write_err = svn_ra_svn_write_cmd_failure(
+                          conn, iterpool,
+                          svn_ra_svn__locate_real_error_child(err));
           svn_error_clear(err);
           if (write_err)
             return write_err;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/ra_svn.h?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/ra_svn.h (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_svn/ra_svn.h Tue Sep 21 14:14:12 2010
@@ -122,6 +122,11 @@ svn_error_t *svn_ra_svn__cram_client(svn
                                      const char *user, const char *password,
                                      const char **message);
 
+/* Return a pointer to the error chain child of ERR which contains the
+ * first "real" error message, not merely one of the
+ * SVN_ERR_RA_SVN_CMD_ERR wrapper errors. */
+svn_error_t *svn_ra_svn__locate_real_error_child(svn_error_t *err);
+
 /* Return an error chain based on @a params (which contains a
  * command response indicating failure).  The error chain will be
  * in the same order as the errors indicated in @a params.  Use

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c Tue Sep 21 14:14:12 2010
@@ -748,52 +748,21 @@ svn_wc_crawl_revisions5(svn_wc_context_t
                                  db, local_abspath, scratch_pool,
                                  scratch_pool);
 
-  {
-    svn_boolean_t has_base = TRUE;
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_return(err);
 
-    if (err)
-      {
-        if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-          return svn_error_return(err);
+      svn_error_clear(err);
+      SVN_ERR(svn_wc__db_read_kind(&target_kind, db, local_abspath, TRUE,
+                                   scratch_pool));
 
-        svn_error_clear(err);
-        has_base = FALSE;
-        SVN_ERR(svn_wc__db_read_kind(&target_kind, db, local_abspath, TRUE,
-                                     scratch_pool));
-
-        if (target_kind == svn_wc__db_kind_file
-            || target_kind == svn_wc__db_kind_symlink)
-          status = svn_wc__db_status_absent; /* Crawl via parent dir */
-        else
-          status = svn_wc__db_status_not_present; /* As checkout */
-      }
-
-    /* ### Check the parentstub if we don't find a BASE. But don't
-           do this if we already have the info we want or we break
-           some copy scenarios. */
-    if (!has_base && target_kind == svn_wc__db_kind_dir)
-      {
-        svn_boolean_t not_present;
-        svn_revnum_t rev = SVN_INVALID_REVNUM;
-        err = svn_wc__db_temp_is_dir_deleted(&not_present, &rev,
-                                             db, local_abspath, scratch_pool);
-
-        if (err && (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND
-                    || err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
-          {
-            svn_error_clear(err);
-            not_present = FALSE;
-          }
-        else
-          SVN_ERR(err);
-
-        if (not_present)
-          status = svn_wc__db_status_not_present;
-
-        if (!SVN_IS_VALID_REVNUM(target_rev))
-          target_rev = rev;
-      }
-  }
+      if (target_kind == svn_wc__db_kind_file
+          || target_kind == svn_wc__db_kind_symlink)
+        status = svn_wc__db_status_absent; /* Crawl via parent dir */
+      else
+        status = svn_wc__db_status_not_present; /* As checkout */
+    }
 
   if ((status == svn_wc__db_status_not_present)
       || (target_kind == svn_wc__db_kind_dir

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c Tue Sep 21 14:14:12 2010
@@ -1288,12 +1288,11 @@ revert_entry(svn_depth_t *depth,
          sure we leave a not-present node behind */
       if (was_not_present)
         {
-          SVN_ERR(svn_wc__db_base_add_absent_node(
+          SVN_ERR(svn_wc__db_base_add_not_present_node(
                     db, local_abspath,
                     repos_relpath, repos_root_url, repos_uuid,
                     base_revision,
                     base_kind,
-                    svn_wc__db_status_not_present,
                     NULL, NULL,
                     pool));
         }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c Tue Sep 21 14:14:12 2010
@@ -2945,7 +2945,6 @@ svn_wc_get_update_editor3(svn_revnum_t *
                                     allow_unver_obstructions,
                                     diff3_cmd,
                                     preserved_exts,
-                                    fetch_func, fetch_baton,
                                     conflict_func, conflict_baton,
                                     external_func, eb,
                                     cancel_func, cancel_baton,
@@ -3062,7 +3061,6 @@ svn_wc_get_switch_editor3(svn_revnum_t *
                                     allow_unver_obstructions,
                                     diff3_cmd,
                                     preserved_exts,
-                                    NULL, NULL,
                                     conflict_func, conflict_baton,
                                     external_func, eb,
                                     cancel_func, cancel_baton,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c?rev=999427&r1=999426&r2=999427&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/entries.c Tue Sep 21 14:14:12 2010
@@ -709,44 +709,16 @@ read_one_entry(const svn_wc_entry_t **ne
         }
       else
         {
-          /* If we are reading child directories, then we need to
-             correctly populate the DELETED flag. WC_DB normally
-             wants to provide all of a directory's metadata from
-             its own area. But this information is stored only in
-             the parent directory, so we need to call a custom API
-             to fetch this value.
-
-             ### we should start generating BASE_NODE rows for THIS_DIR
-             ### in the subdir. future step because it is harder.  */
-          if (kind == svn_wc__db_kind_dir && *entry->name != '\0')
-            {
-              SVN_ERR(svn_wc__db_temp_is_dir_deleted(&entry->deleted,
-                                                     &entry->revision,
-                                                     db, entry_abspath,
-                                                     scratch_pool));
-            }
-          if (entry->deleted)
-            {
-              /* There was a DELETED marker in the parent, meaning
-                 that we truly are shadowing a base node. It isn't
-                 called a 'replace' though (the BASE is pretending
-                 not to exist).  */
-              entry->schedule = svn_wc_schedule_add;
-            }
-          else
-            {
-              /* There was NOT a 'not-present' BASE_NODE in the parent
-                 directory. And there is no BASE_NODE in this directory.
-                 Therefore, we are looking at some kind of add/copy
-                 rather than a replace.  */
-
-              /* ### if this looks like a plain old add, then rev=0.  */
-              if (!SVN_IS_VALID_REVNUM(entry->copyfrom_rev)
-                  && !SVN_IS_VALID_REVNUM(entry->cmt_rev))
-                entry->revision = 0;
+          /* There is NO 'not-present' BASE_NODE for this node.
+             Therefore, we are looking at some kind of add/copy
+             rather than a replace.  */
+
+          /* ### if this looks like a plain old add, then rev=0.  */
+          if (!SVN_IS_VALID_REVNUM(entry->copyfrom_rev)
+              && !SVN_IS_VALID_REVNUM(entry->cmt_rev))
+            entry->revision = 0;
 
-              entry->schedule = svn_wc_schedule_add;
-            }
+          entry->schedule = svn_wc_schedule_add;
         }
 
       /* If we don't have "real" data from the entry (obstruction),
@@ -1677,6 +1649,7 @@ insert_working_node(svn_sqlite__db_t *sd
 {
   svn_sqlite__stmt_t *stmt;
 
+#ifndef SVN_WC__NODES_ONLY
   /* ### NODE_DATA when switching to NODE_DATA, replace the
      query below with STMT_INSERT_WORKING_NODE_DATA_2
      and adjust the parameters bound. Can't do that yet. */
@@ -1748,68 +1721,60 @@ insert_working_node(svn_sqlite__db_t *sd
 
   /* Execute and reset the insert clause. */
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
+#endif
 
-#ifdef SVN_WC__NODE_DATA
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                    STMT_INSERT_WORKING_NODE_DATA_1));
+#ifdef SVN_WC__NODES
+  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_NODE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "isisnnnnsnrisnnni",
+                            working_node->wc_id, working_node->local_relpath,
+                            (working_node->parent_relpath == NULL
+                             ? (apr_int64_t)1 : (apr_int64_t)2),
+                            working_node->parent_relpath,
+                            /* Setting depth for files? */
+                            svn_depth_to_word(working_node->depth),
+                            working_node->changed_rev,
+                            working_node->changed_date,
+                            working_node->changed_author,
+                            working_node->last_mod_time));
 
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 1, working_node->wc_id));
-  SVN_ERR(svn_sqlite__bind_text(stmt, 2, working_node->local_relpath));
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 3,
-               (*working_node->local_relpath == '\0') ? 1 : 2));
-  SVN_ERR(svn_sqlite__bind_text(stmt, 4, working_node->parent_relpath));
+  if (working_node->copyfrom_repos_path)
+    {
+      SVN_ERR(svn_sqlite__bind_int64(stmt, 5,
+                                     working_node->copyfrom_repos_id));
+      SVN_ERR(svn_sqlite__bind_text(stmt, 6,
+                                    working_node->copyfrom_repos_path));
+      SVN_ERR(svn_sqlite__bind_int64(stmt, 7, working_node->copyfrom_revnum));
+    }
 
-  /* ### need rest of values */
   if (working_node->presence == svn_wc__db_status_normal)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "normal"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "normal"));
   else if (working_node->presence == svn_wc__db_status_not_present)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "not-present"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "not-present"));
   else if (working_node->presence == svn_wc__db_status_base_deleted)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "base-deleted"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "base-deleted"));
   else if (working_node->presence == svn_wc__db_status_incomplete)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "incomplete"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "incomplete"));
   else if (working_node->presence == svn_wc__db_status_excluded)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 5, "excluded"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "excluded"));
 
   if (working_node->kind == svn_node_none)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 6, "unknown"));
+    SVN_ERR(svn_sqlite__bind_text(stmt, 10, "unknown"));
   else
-    SVN_ERR(svn_sqlite__bind_text(stmt, 6,
+    SVN_ERR(svn_sqlite__bind_text(stmt, 10,
                                   svn_node_kind_to_word(working_node->kind)));
 
-  if (working_node->copyfrom_repos_path)
-    {
-      SVN_ERR(svn_sqlite__bind_int64(stmt, 7,
-                                     working_node->copyfrom_repos_id));
-      SVN_ERR(svn_sqlite__bind_text(stmt, 8,
-                                    working_node->copyfrom_repos_path));
-      SVN_ERR(svn_sqlite__bind_int64(stmt, 9, working_node->copyfrom_revnum));
-    }
-
-  if (working_node->checksum)
-    SVN_ERR(svn_sqlite__bind_checksum(stmt, 10, working_node->checksum,
+  if (working_node->kind == svn_wc__db_kind_file)
+    SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, working_node->checksum,
                                       scratch_pool));
 
-  if (SVN_IS_VALID_REVNUM(working_node->changed_rev))
-    SVN_ERR(svn_sqlite__bind_int64(stmt, 11, working_node->changed_rev));
-  if (working_node->changed_date)
-    SVN_ERR(svn_sqlite__bind_int64(stmt, 12, working_node->changed_date));
-  if (working_node->changed_author)
-    SVN_ERR(svn_sqlite__bind_text(stmt, 13, working_node->changed_author));
-
-  SVN_ERR(svn_sqlite__bind_text(stmt, 14,
-                                svn_depth_to_word(working_node->depth)));
-
   if (working_node->properties)
     SVN_ERR(svn_sqlite__bind_properties(stmt, 15, working_node->properties,
                                         scratch_pool));
 
-  /* ### we should bind 'symlink_target' (16) as appropriate.  */
+  if (working_node->translated_size != SVN_INVALID_FILESIZE)
+    SVN_ERR(svn_sqlite__bind_int64(stmt, 16, working_node->translated_size));
 
-  /* Execute and reset the insert clause. */
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
-
 #endif
 
   return SVN_NO_ERROR;