You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/04/09 23:16:03 UTC

svn commit: r1586146 - in /subversion/trunk: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/include/ subversion/include/privat...

Author: brane
Date: Wed Apr  9 21:16:03 2014
New Revision: 1586146

URL: http://svn.apache.org/r1586146
Log:
Reintegrated the remote-only-status branch.

Modified:
    subversion/trunk/   (props changed)
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/deprecated.c
    subversion/trunk/subversion/libsvn_client/status.c
    subversion/trunk/subversion/libsvn_fs_x/   (props changed)
    subversion/trunk/subversion/libsvn_wc/copy.c
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/diff_editor.c
    subversion/trunk/subversion/libsvn_wc/status.c
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/svn/status-cmd.c
    subversion/trunk/subversion/tests/libsvn_client/client-test.c
    subversion/trunk/subversion/tests/libsvn_fs_x/   (props changed)
    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/trunk/subversion/tests/svn_test.h
    subversion/trunk/subversion/tests/svn_test_main.c

Propchange: subversion/trunk/
------------------------------------------------------------------------------
  Merged /subversion/branches/remote-only-status:r1581845-1586090

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Wed Apr  9 21:16:03 2014
@@ -187,8 +187,9 @@ void SVNClient::list(const char *url, Re
 
 void
 SVNClient::status(const char *path, svn_depth_t depth,
-                  bool onServer, bool getAll, bool noIgnore,
-                  bool ignoreExternals, StringArray &changelists,
+                  bool onServer, bool onDisk, bool getAll,
+                  bool noIgnore, bool ignoreExternals,
+                  bool depthAsSticky, StringArray &changelists,
                   StatusCallback *callback)
 {
     SVN::Pool subPool(pool);
@@ -207,11 +208,10 @@ SVNClient::status(const char *path, svn_
 
     rev.kind = svn_opt_revision_unspecified;
 
-    SVN_JNI_ERR(svn_client_status5(&youngest, ctx, checkedPath.c_str(),
-                                   &rev,
-                                   depth,
-                                   getAll, onServer, noIgnore, ignoreExternals,
-                                   FALSE,
+    SVN_JNI_ERR(svn_client_status6(&youngest, ctx, checkedPath.c_str(),
+                                   &rev, depth,
+                                   getAll, onServer, onDisk,
+                                   noIgnore, ignoreExternals, depthAsSticky,
                                    changelists.array(subPool),
                                    StatusCallback::callback, callback,
                                    subPool.getPool()), );

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Wed Apr  9 21:16:03 2014
@@ -169,9 +169,11 @@ class SVNClient :public SVNBase
                              StringArray &changelists);
   void getChangelists(const char *path, StringArray *changelists,
                       svn_depth_t depth, ChangelistCallback *callback);
-  void status(const char *path, svn_depth_t depth, bool onServer,
-              bool getAll, bool noIgnore, bool ignoreExternals,
-              StringArray &changelists, StatusCallback *callback);
+  void status(const char *path, svn_depth_t depth,
+              bool onServer, bool onDisk, bool getAll,
+              bool noIgnore, bool ignoreExternals,
+              bool depthAsSticky, StringArray &changelists,
+              StatusCallback *callback);
   void list(const char *url, Revision &revision, Revision &pegRevision,
             svn_depth_t depth, int direntFields, bool fetchLocks,
             ListCallback *callback);

Modified: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Wed Apr  9 21:16:03 2014
@@ -184,8 +184,9 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_status
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
- jboolean jonServer, jboolean jgetAll, jboolean jnoIgnore,
- jboolean jignoreExternals, jobject jchangelists,
+ jboolean jonServer, jboolean jonDisk, jboolean jgetAll,
+ jboolean jnoIgnore, jboolean jignoreExternals,
+ jboolean jdepthAsSticky, jobject jchangelists,
  jobject jstatusCallback)
 {
   JNIEntry(SVNClient, status);
@@ -203,9 +204,9 @@ Java_org_apache_subversion_javahl_SVNCli
 
   StatusCallback callback(jstatusCallback);
   cl->status(path, EnumMapper::toDepth(jdepth),
-             jonServer ? true:false,
-             jgetAll ? true:false, jnoIgnore ? true:false,
-             jignoreExternals ? true:false, changelists, &callback);
+             bool(jonServer), bool(jonDisk), bool(jgetAll),
+             bool(jnoIgnore), bool(jignoreExternals),
+             bool(jdepthAsSticky), changelists, &callback);
 }
 
 JNIEXPORT void JNICALL

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Wed Apr  9 21:16:03 2014
@@ -79,16 +79,40 @@ public interface ISVNClient
     public boolean isAdminDirectory(String name);
 
     /**
-     * List a directory or file of the working copy.
+     * Return the status of the working copy and maybe repository.
      *
      * @param path        Path to explore.
      * @param depth       How deep to recurse into subdirectories.
      * @param onServer    Request status information from server.
+     * @param onDisk      Check the working copy for local modifications.
+     *                    A value of <code>false</code> only
+     *                    has effect when <code>onServer</code> is
+     *                    <code>true</code>.
      * @param getAll      get status for uninteresting (unchanged) files.
      * @param noIgnore    get status for normaly ignored files and directories.
      * @param ignoreExternals if externals are ignored during status
+     * @param depthAsSticky When set, interpret <code>depth</code> as
+     *                      the ambient depth of the working copy.
      * @param changelists changelists to filter by
+     * @since 1.9
+     */
+    void status(String path, Depth depth,
+                boolean onServer, boolean ignoreLocal,
+                boolean getAll, boolean noIgnore,
+                boolean ignoreExternals, boolean depthAsSticky,
+                Collection<String> changelists, StatusCallback callback)
+            throws ClientException;
+
+    /**
+     * Return information about the status of the working copy and
+     * maybe repository.
+     * <p>
+     * Behaves like the 1.9 version with
+     *     <code>onDisk = true</code> and
+     *     <code>depthAsSticky = false</code>.
+     * @deprecated
      */
+    @Deprecated
     void status(String path, Depth depth, boolean onServer,
                 boolean getAll, boolean noIgnore, boolean ignoreExternals,
                 Collection<String> changelists, StatusCallback callback)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Wed Apr  9 21:16:03 2014
@@ -121,13 +121,26 @@ public class SVNClient implements ISVNCl
     @Deprecated
     public native String getLastPath();
 
-    public native void status(String path, Depth depth, boolean onServer,
+    public native void status(String path, Depth depth,
+                              boolean onServer, boolean onDisk,
                               boolean getAll, boolean noIgnore,
-                              boolean ignoreExternals,
+                              boolean ignoreExternals, boolean depthAsSticky,
                               Collection<String> changelists,
                               StatusCallback callback)
             throws ClientException;
 
+    @Deprecated
+    public void status(String path, Depth depth, boolean onServer,
+                       boolean getAll, boolean noIgnore,
+                       boolean ignoreExternals,
+                       Collection<String> changelists,
+                       StatusCallback callback)
+            throws ClientException
+    {
+        status(path, depth, onServer, true, getAll, noIgnore,
+               ignoreExternals, false, changelists, callback);
+    }
+
     public native void list(String url, Revision revision,
                             Revision pegRevision, Depth depth, int direntFields,
                             boolean fetchLocks, ListCallback callback)

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Apr  9 21:16:03 2014
@@ -315,8 +315,9 @@ public class BasicTests extends SVNTests
         File fileC = new File(thisTest.getWorkingCopy() + "/A", "foo.c");
 
         MyStatusCallback statusCallback = new MyStatusCallback();
-        client.status(fileToSVNPath(fileC, false), Depth.unknown, false, true,
-                    false, false, null, statusCallback);
+        client.status(fileToSVNPath(fileC, false), Depth.unknown,
+                      false, true, true, false, false, false,
+                      null, statusCallback);
 
         final int statusCount = statusCallback.getStatusArray().length;
         if (statusCount == 1)
@@ -401,7 +402,8 @@ public class BasicTests extends SVNTests
 
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/D/G/rho", Depth.immediates,
-                        false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long rhoCommitDate = status.getLastChangedDate().getTime();
         long rhoCommitRev = rev;
@@ -438,7 +440,8 @@ public class BasicTests extends SVNTests
                 + "modification to tau");
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/D/G/tau", Depth.immediates,
-                      false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long tauCommitDate = status.getLastChangedDate().getTime();
         long tauCommitRev = rev;
@@ -467,7 +470,8 @@ public class BasicTests extends SVNTests
         thisTest.getWc().addItem("A/B/I", null);
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/B/I", Depth.immediates,
-                    false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long ICommitDate = status.getLastChangedDate().getTime();
         long ICommitRev = rev;
@@ -502,7 +506,8 @@ public class BasicTests extends SVNTests
         thisTest.getWc().addItem("A/D/H/nu", "This is the file 'nu'.");
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/D/H/nu", Depth.immediates,
-                    false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long nuCommitDate = status.getLastChangedDate().getTime();
         long nuCommitRev = rev;
@@ -519,7 +524,8 @@ public class BasicTests extends SVNTests
         thisTest.getWc().setItemWorkingCopyRevision("A/B/F", rev);
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/B/F", Depth.immediates,
-                    false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long FCommitDate = status.getLastChangedDate().getTime();
         long FCommitRev = rev;
@@ -550,7 +556,8 @@ public class BasicTests extends SVNTests
                                  "This is the replacement file 'chi'.");
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/D/H/chi", Depth.immediates,
-                    false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long chiCommitDate = status.getLastChangedDate().getTime();
         long chiCommitRev = rev;
@@ -601,7 +608,8 @@ public class BasicTests extends SVNTests
         assertEquals("wrong revision number from commit", rev, expectedRev++);
         statusCallback = new MyStatusCallback();
         client.status(thisTest.getWCPath() + "/A/D/H/psi", Depth.immediates,
-                      false, true, false, false, null, statusCallback);
+                      false, true, true, false, false, false,
+                      null, statusCallback);
         status = statusCallback.getStatusArray()[0];
         long psiCommitDate = status.getLastChangedDate().getTime();
         long psiCommitRev = rev;
@@ -1075,7 +1083,8 @@ public class BasicTests extends SVNTests
 
         MyStatusCallback statusCallback = new MyStatusCallback();
         String statusPath = fileToSVNPath(new File(thisTest.getWCPath() + "/A/B"), true);
-        client.status(statusPath, Depth.infinity, false, false, false, true,
+        client.status(statusPath, Depth.infinity,
+                      false, true, false, false, true, false,
                       null, statusCallback);
         Status[] statusList = statusCallback.getStatusArray();
         assertEquals(statusPath + "/F/alpha",
@@ -2345,8 +2354,9 @@ public class BasicTests extends SVNTests
         assertTrue(changelists.equals(cl));
         // Does status report this changelist?
         MyStatusCallback statusCallback = new MyStatusCallback();
-        client.status(path, Depth.immediates, false, false, false, false,
-                    null, statusCallback);
+        client.status(path, Depth.immediates,
+                      false, true, false, false, false, false,
+                      null, statusCallback);
         Status[] status = statusCallback.getStatusArray();
         assertEquals(status[0].getChangelist(), changelistName);
 

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Wed Apr  9 21:16:03 2014
@@ -793,7 +793,8 @@ class SVNTests extends TestCase
         {
             MyStatusCallback statusCallback = new MyStatusCallback();
             client.status(workingCopy.getAbsolutePath(), Depth.unknown,
-                          checkRepos, true, true, false, null, statusCallback);
+                          checkRepos, false, true, true, false, false,
+                          null, statusCallback);
             wc.check(statusCallback.getStatusArray(),
                     workingCopy.getAbsolutePath(), checkRepos);
         }

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Apr  9 21:16:03 2014
@@ -1306,8 +1306,8 @@ svn_wc__resolve_relative_external_url(co
  *
  * Assuming the target is a directory, then:
  *
- *   - If @a get_all is FALSE, then only locally-modified entries will be
- *     returned.  If TRUE, then all entries will be returned.
+ *   - If @a get_all is @c FALSE, then only locally-modified entries will be
+ *     returned.  If @c TRUE, then all entries will be returned.
  *
  *   - If @a depth is #svn_depth_empty, a status structure will
  *     be returned for the target only; if #svn_depth_files, for the
@@ -1322,6 +1322,9 @@ svn_wc__resolve_relative_external_url(co
  *     If the given @a depth is incompatible with the depth found in a
  *     working copy directory, the found depth always governs.
  *
+ * If @a check_working_copy is not set, do not scan the working copy
+ * for local modifications, taking only the BASE tree into account.
+ *
  * If @a no_ignore is set, statuses that would typically be ignored
  * will instead be reported.
  *
@@ -1356,6 +1359,7 @@ svn_wc__get_status_editor(const svn_delt
                           const char *target_basename,
                           svn_depth_t depth,
                           svn_boolean_t get_all,
+                          svn_boolean_t check_working_copy,
                           svn_boolean_t no_ignore,
                           svn_boolean_t depth_as_sticky,
                           svn_boolean_t server_performs_filtering,

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Wed Apr  9 21:16:03 2014
@@ -2501,12 +2501,20 @@ typedef svn_error_t *(*svn_client_status
  *      retrieve only "interesting" entries (local mods and/or
  *      out of date).
  *
- *    - If @a update is set, contact the repository and augment the
- *      status structures with information about out-of-dateness (with
- *      respect to @a revision).  Also, if @a result_rev is not @c NULL,
- *      set @a *result_rev to the actual revision against which the
- *      working copy was compared (@a *result_rev is not meaningful unless
- *      @a update is set).
+ *    - If @a check_out_of_date is set, contact the repository and
+ *      augment the status structures with information about
+ *      out-of-dateness (with respect to @a revision).  Also, if @a
+ *      result_rev is not @c NULL, set @a *result_rev to the actual
+ *      revision against which the working copy was compared (@a
+ *      *result_rev is not meaningful unless @a check_out_of_date is
+ *      set).
+ *
+ *    - If @a check_working_copy is not set, do not scan the working
+ *      copy for local modifications. This parameter will be ignored
+ *      unless @a check_out_of_date is set.  When set, the status
+ *      report will not contain any information about local changes in
+ *      the working copy; this includes local deletions and
+ *      replacements.
  *
  * If @a no_ignore is @c FALSE, don't report any file or directory (or
  * recurse into any directory) that is found by recursion (as opposed to
@@ -2537,8 +2545,34 @@ typedef svn_error_t *(*svn_client_status
  *
  * All temporary allocations are performed in @a scratch_pool.
  *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_status6(svn_revnum_t *result_rev,
+                   svn_client_ctx_t *ctx,
+                   const char *path,
+                   const svn_opt_revision_t *revision,
+                   svn_depth_t depth,
+                   svn_boolean_t get_all,
+                   svn_boolean_t check_out_of_date,
+                   svn_boolean_t check_working_copy,
+                   svn_boolean_t no_ignore,
+                   svn_boolean_t ignore_externals,
+                   svn_boolean_t depth_as_sticky,
+                   const apr_array_header_t *changelists,
+                   svn_client_status_func_t status_func,
+                   void *status_baton,
+                   apr_pool_t *scratch_pool);
+
+
+/**
+ * Same as svn_client_status6(), but with @a check_out_of_date set to
+ * @a update and @a check_working_copy set to @c TRUE.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_status5(svn_revnum_t *result_rev,
                    svn_client_ctx_t *ctx,

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Wed Apr  9 21:16:03 2014
@@ -2207,6 +2207,28 @@ svn_client_proplist(apr_array_header_t *
 
 /*** From status.c ***/
 
+svn_error_t *
+svn_client_status5(svn_revnum_t *result_rev,
+                   svn_client_ctx_t *ctx,
+                   const char *path,
+                   const svn_opt_revision_t *revision,
+                   svn_depth_t depth,
+                   svn_boolean_t get_all,
+                   svn_boolean_t update,
+                   svn_boolean_t no_ignore,
+                   svn_boolean_t ignore_externals,
+                   svn_boolean_t depth_as_sticky,
+                   const apr_array_header_t *changelists,
+                   svn_client_status_func_t status_func,
+                   void *status_baton,
+                   apr_pool_t *scratch_pool)
+{
+  return svn_client_status6(result_rev, ctx, path, revision, depth,
+                            get_all, update, TRUE, no_ignore,
+                            ignore_externals, depth_as_sticky, changelists,
+                            status_func, status_baton, scratch_pool);
+}
+
 struct status4_wrapper_baton
 {
   svn_wc_context_t *wc_ctx;

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Wed Apr  9 21:16:03 2014
@@ -246,7 +246,8 @@ do_external_status(svn_client_ctx_t *ctx
                    apr_hash_t *external_map,
                    svn_depth_t depth,
                    svn_boolean_t get_all,
-                   svn_boolean_t update,
+                   svn_boolean_t check_out_of_date,
+                   svn_boolean_t check_working_copy,
                    svn_boolean_t no_ignore,
                    const apr_array_header_t *changelists,
                    const char *anchor_abspath,
@@ -314,8 +315,9 @@ do_external_status(svn_client_ctx_t *ctx
         }
 
       /* And then do the status. */
-      SVN_ERR(svn_client_status5(NULL, ctx, status_path, &opt_rev, depth,
-                                 get_all, update, no_ignore,
+      SVN_ERR(svn_client_status6(NULL, ctx, status_path, &opt_rev, depth,
+                                 get_all, check_out_of_date,
+                                 check_working_copy, no_ignore,
                                  FALSE /* ignore_exernals */,
                                  FALSE /* depth_as_sticky */,
                                  changelists, status_func, status_baton,
@@ -332,13 +334,14 @@ do_external_status(svn_client_ctx_t *ctx
 
 
 svn_error_t *
-svn_client_status5(svn_revnum_t *result_rev,
+svn_client_status6(svn_revnum_t *result_rev,
                    svn_client_ctx_t *ctx,
                    const char *path,
                    const svn_opt_revision_t *revision,
                    svn_depth_t depth,
                    svn_boolean_t get_all,
-                   svn_boolean_t update,
+                   svn_boolean_t check_out_of_date,
+                   svn_boolean_t check_working_copy,
                    svn_boolean_t no_ignore,
                    svn_boolean_t ignore_externals,
                    svn_boolean_t depth_as_sticky,
@@ -355,6 +358,11 @@ svn_client_status5(svn_revnum_t *result_
   svn_error_t *err;
   apr_hash_t *changelist_hash = NULL;
 
+  /* Override invalid combinations of the check_out_of_date and
+     check_working_copy flags. */
+  if (!check_out_of_date)
+    check_working_copy = TRUE;
+
   if (svn_path_is_url(path))
     return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
                              _("'%s' is not a local path"), path);
@@ -373,7 +381,7 @@ svn_client_status5(svn_revnum_t *result_
 
   SVN_ERR(svn_dirent_get_absolute(&target_abspath, path, pool));
 
-  if (update)
+  if (check_out_of_date)
     {
       /* The status editor only works on directories, so get the ancestor
          if necessary */
@@ -441,7 +449,7 @@ svn_client_status5(svn_revnum_t *result_
   /* If we want to know about out-of-dateness, we crawl the working copy and
      let the RA layer drive the editor for real.  Otherwise, we just close the
      edit.  :-) */
-  if (update)
+  if (check_out_of_date)
     {
       svn_ra_session_t *ra_session;
       const char *URL;
@@ -471,14 +479,14 @@ svn_client_status5(svn_revnum_t *result_
                                     SVN_RA_CAPABILITY_DEPTH, pool));
 
       SVN_ERR(svn_wc__get_status_editor(&editor, &edit_baton, &set_locks_baton,
-                                    &edit_revision, ctx->wc_ctx,
-                                    dir_abspath, target_basename,
-                                    depth, get_all,
-                                    no_ignore, depth_as_sticky,
-                                    server_supports_depth,
-                                    ignores, tweak_status, &sb,
-                                    ctx->cancel_func, ctx->cancel_baton,
-                                    pool, pool));
+                                        &edit_revision, ctx->wc_ctx,
+                                        dir_abspath, target_basename,
+                                        depth, get_all, check_working_copy,
+                                        no_ignore, depth_as_sticky,
+                                        server_supports_depth,
+                                        ignores, tweak_status, &sb,
+                                        ctx->cancel_func, ctx->cancel_baton,
+                                        pool, pool));
 
 
       /* Verify that URL exists in HEAD.  If it doesn't, this can save
@@ -613,7 +621,8 @@ svn_client_status5(svn_revnum_t *result_
 
       SVN_ERR(do_external_status(ctx, external_map,
                                  depth, get_all,
-                                 update, no_ignore, changelists,
+                                 check_out_of_date, check_working_copy,
+                                 no_ignore, changelists,
                                  sb.anchor_abspath, sb.anchor_relpath,
                                  status_func, status_baton, pool));
     }

Propchange: subversion/trunk/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/branches/remote-only-status/subversion/libsvn_fs_x:r1581845-1586090

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Wed Apr  9 21:16:03 2014
@@ -353,6 +353,7 @@ copy_versioned_dir(svn_wc__db_t *db,
   SVN_ERR(svn_wc__db_read_children_info(&versioned_children,
                                         &conflicted_children,
                                         db, src_abspath,
+                                        FALSE /* base_tree_only */,
                                         scratch_pool, iterpool));
   for (hi = apr_hash_first(scratch_pool, versioned_children);
        hi;
@@ -942,6 +943,7 @@ remove_all_conflict_markers(svn_wc__db_t
           artillery. */
   SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts, db,
                                         src_dir_abspath,
+                                        FALSE /* base_tree_only */,
                                         scratch_pool, iterpool));
 
   for (hi = apr_hash_first(scratch_pool, nodes);

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Wed Apr  9 21:16:03 2014
@@ -2897,9 +2897,9 @@ svn_wc_get_status_editor5(const svn_delt
                               wc_ctx,
                               anchor_abspath,
                               target_basename,
-                              depth,
-                              get_all, no_ignore,
-                              depth_as_sticky,
+                              depth, get_all,
+                              TRUE, /* check_working_copy */
+                              no_ignore, depth_as_sticky,
                               server_performs_filtering,
                               ignore_patterns,
                               status_func, status_baton,

Modified: subversion/trunk/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/diff_editor.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff_editor.c Wed Apr  9 21:16:03 2014
@@ -578,6 +578,7 @@ ensure_local_info(struct dir_baton_t *db
 
   SVN_ERR(svn_wc__db_read_children_info(&db->local_info, &conflicts,
                                         db->eb->db, db->local_abspath,
+                                        FALSE /* base_tree_only */,
                                         db->pool, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -667,6 +668,7 @@ walk_local_nodes_diff(struct edit_baton_
 
       SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts,
                                             db, local_abspath,
+                                            FALSE /* base_tree_only */,
                                             scratch_pool, iterpool));
 
       children = svn_sort__hash(nodes, svn_sort_compare_items_lexically,
@@ -1079,6 +1081,7 @@ svn_wc__diff_local_only_dir(svn_wc__db_t
                                 scratch_pool, iterpool));
 
   SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts, db, local_abspath,
+                                        FALSE /* base_tree_only */,
                                         scratch_pool, iterpool));
 
   if (depth_below_here == svn_depth_immediates)

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Wed Apr  9 21:16:03 2014
@@ -71,6 +71,9 @@ struct walk_status_baton
   /* Should we ignore text modifications? */
   svn_boolean_t ignore_text_mods;
 
+  /* Scan the working copy for local modifications and missing nodes. */
+  svn_boolean_t check_working_copy;
+
   /* Externals info harvested during the status run. */
   apr_hash_t *externals;
 
@@ -335,6 +338,7 @@ static svn_error_t *
 internal_status(svn_wc_status3_t **status,
                 svn_wc__db_t *db,
                 const char *local_abspath,
+                svn_boolean_t check_working_copy,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool);
 
@@ -352,7 +356,8 @@ internal_status(svn_wc_status3_t **statu
    *STATUS will be set to NULL.  If GET_ALL is non-zero, then *STATUS will be
    allocated and returned no matter what.  If IGNORE_TEXT_MODS is TRUE then
    don't check for text mods, assume there are none and set and *STATUS
-   returned to reflect that assumption.
+   returned to reflect that assumption. If CHECK_WORKING_COPY is FALSE,
+   do not adjust the result for missing working copy files.
 
    The status struct's repos_lock field will be set to REPOS_LOCK.
 */
@@ -367,6 +372,7 @@ assemble_status(svn_wc_status3_t **statu
                 const svn_io_dirent2_t *dirent,
                 svn_boolean_t get_all,
                 svn_boolean_t ignore_text_mods,
+                svn_boolean_t check_working_copy,
                 const svn_lock_t *repos_lock,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
@@ -424,7 +430,7 @@ assemble_status(svn_wc_status3_t **statu
             copied = TRUE; /* Working deletion */
         }
     }
-  else
+  else if (check_working_copy)
     {
       /* Examine whether our target is missing or obstructed. To detect
        * obstructions, we have to look at the on-disk status in DIRENT. */
@@ -819,7 +825,8 @@ send_status_structure(const struct walk_
   SVN_ERR(assemble_status(&statstruct, wb->db, local_abspath,
                           parent_repos_root_url, parent_repos_relpath,
                           parent_repos_uuid,
-                          info, dirent, get_all, wb->ignore_text_mods,
+                          info, dirent, get_all,
+                          wb->ignore_text_mods, wb->check_working_copy,
                           repos_lock, scratch_pool, scratch_pool));
 
   if (statstruct && status_func)
@@ -1233,22 +1240,28 @@ get_dir_status(const struct walk_status_
 
   iterpool = svn_pool_create(scratch_pool);
 
-  err = svn_io_get_dirents3(&dirents, local_abspath,
-                            wb->ignore_text_mods /* only_check_type*/,
-                            scratch_pool, iterpool);
-  if (err
-      && (APR_STATUS_IS_ENOENT(err->apr_err)
-         || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)))
+  if (wb->check_working_copy)
     {
-      svn_error_clear(err);
-      dirents = apr_hash_make(scratch_pool);
+      err = svn_io_get_dirents3(&dirents, local_abspath,
+                                wb->ignore_text_mods /* only_check_type*/,
+                                scratch_pool, iterpool);
+      if (err
+          && (APR_STATUS_IS_ENOENT(err->apr_err)
+              || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)))
+        {
+          svn_error_clear(err);
+          dirents = apr_hash_make(scratch_pool);
+        }
+      else
+        SVN_ERR(err);
     }
   else
-    SVN_ERR(err);
+    dirents = apr_hash_make(scratch_pool);
 
   if (!dir_info)
-      SVN_ERR(svn_wc__db_read_single_info(&dir_info, wb->db, local_abspath,
-                                          scratch_pool, iterpool));
+    SVN_ERR(svn_wc__db_read_single_info(&dir_info, wb->db, local_abspath,
+                                        !wb->check_working_copy,
+                                        scratch_pool, iterpool));
 
   SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url,
                                      &dir_repos_uuid, dir_info,
@@ -1262,6 +1275,7 @@ get_dir_status(const struct walk_status_
      hash are subsequently used. */
   SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts,
                                         wb->db, local_abspath,
+                                        !wb->check_working_copy,
                                         scratch_pool, iterpool));
 
   all_children = apr_hash_overlay(scratch_pool, nodes, dirents);
@@ -1410,6 +1424,7 @@ get_child_status(const struct walk_statu
 
   SVN_ERR(svn_wc__db_read_single_info(&dir_info,
                                       wb->db, parent_abspath,
+                                      !wb->check_working_copy,
                                       scratch_pool, scratch_pool));
 
   SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url,
@@ -1503,6 +1518,7 @@ tweak_statushash(void *baton,
                  void *this_dir_baton,
                  svn_boolean_t is_dir_baton,
                  svn_wc__db_t *db,
+                 svn_boolean_t check_working_copy,
                  const char *local_abspath,
                  enum svn_wc_status_kind repos_node_status,
                  enum svn_wc_status_kind repos_text_status,
@@ -1542,8 +1558,8 @@ tweak_statushash(void *baton,
         return SVN_NO_ERROR;
 
       /* Use the public API to get a statstruct, and put it into the hash. */
-      SVN_ERR(internal_status(&statstruct, db, local_abspath, pool,
-                              scratch_pool));
+      SVN_ERR(internal_status(&statstruct, db, local_abspath,
+                              check_working_copy, pool, scratch_pool));
       statstruct->repos_lock = repos_lock;
       svn_hash_sets(statushash, apr_pstrdup(pool, local_abspath), statstruct);
     }
@@ -2002,7 +2018,7 @@ delete_entry(const char *path,
      statushash immediately.  No need to wait until close_file or
      close_dir, because there's no risk of having to honor the 'added'
      flag.  We already know this item exists in the working copy. */
-  SVN_ERR(tweak_statushash(db, db, TRUE, eb->db,
+  SVN_ERR(tweak_statushash(db, db, TRUE, eb->db, eb->wb.check_working_copy,
                            local_abspath,
                            svn_wc_status_deleted, 0, 0, revision, NULL, pool));
 
@@ -2010,7 +2026,8 @@ delete_entry(const char *path,
      is the root node and we're not supposed to report on the root
      node).  */
   if (db->parent_baton && (! *eb->target_basename))
-    SVN_ERR(tweak_statushash(db->parent_baton, db, TRUE,eb->db,
+    SVN_ERR(tweak_statushash(db->parent_baton, db, TRUE,
+                             eb->db, eb->wb.check_working_copy,
                              db->local_abspath,
                              svn_wc_status_modified, svn_wc_status_modified,
                              0, SVN_INVALID_REVNUM, NULL, pool));
@@ -2134,7 +2151,9 @@ close_directory(void *dir_baton,
         {
           /* ### When we add directory locking, we need to find a
              ### directory lock here. */
-          SVN_ERR(tweak_statushash(pb, db, TRUE, eb->db, db->local_abspath,
+          SVN_ERR(tweak_statushash(pb, db, TRUE,
+                                   eb->db,  eb->wb.check_working_copy,
+                                   db->local_abspath,
                                    repos_node_status, repos_text_status,
                                    repos_prop_status, SVN_INVALID_REVNUM, NULL,
                                    scratch_pool));
@@ -2386,6 +2405,7 @@ close_file(void *file_baton,
     }
 
   return tweak_statushash(fb, NULL, FALSE, fb->edit_baton->db,
+                          fb->edit_baton->wb.check_working_copy,
                           fb->local_abspath, repos_node_status,
                           repos_text_status, repos_prop_status,
                           SVN_INVALID_REVNUM, repos_lock, pool);
@@ -2434,6 +2454,7 @@ svn_wc__get_status_editor(const svn_delt
                           const char *target_basename,
                           svn_depth_t depth,
                           svn_boolean_t get_all,
+                          svn_boolean_t check_working_copy,
                           svn_boolean_t no_ignore,
                           svn_boolean_t depth_as_sticky,
                           svn_boolean_t server_performs_filtering,
@@ -2473,7 +2494,8 @@ svn_wc__get_status_editor(const svn_delt
 
   eb->wb.db               = wc_ctx->db;
   eb->wb.target_abspath   = eb->target_abspath;
-  eb->wb.ignore_text_mods = FALSE;
+  eb->wb.ignore_text_mods = !check_working_copy;
+  eb->wb.check_working_copy = check_working_copy;
   eb->wb.repos_locks      = NULL;
   eb->wb.repos_root       = NULL;
 
@@ -2498,7 +2520,7 @@ svn_wc__get_status_editor(const svn_delt
   /* The edit baton's status structure maps to PATH, and the editor
      have to be aware of whether that is the anchor or the target. */
   SVN_ERR(internal_status(&(eb->anchor_status), wc_ctx->db, anchor_abspath,
-                         result_pool, scratch_pool));
+                          check_working_copy, result_pool, scratch_pool));
 
   /* Construct an editor. */
   tree_editor->set_target_revision = set_target_revision;
@@ -2604,6 +2626,7 @@ svn_wc__internal_walk_status(svn_wc__db_
   wb.db = db;
   wb.target_abspath = local_abspath;
   wb.ignore_text_mods = ignore_text_mods;
+  wb.check_working_copy = TRUE;
   wb.repos_root = NULL;
   wb.repos_locks = NULL;
 
@@ -2618,6 +2641,7 @@ svn_wc__internal_walk_status(svn_wc__db_
     }
 
   err = svn_wc__db_read_single_info(&info, db, local_abspath,
+                                    FALSE /* base_tree_only */,
                                     scratch_pool, scratch_pool);
 
   if (err)
@@ -2769,10 +2793,11 @@ static svn_error_t *
 internal_status(svn_wc_status3_t **status,
                 svn_wc__db_t *db,
                 const char *local_abspath,
+                svn_boolean_t check_working_copy,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
-  const svn_io_dirent2_t *dirent;
+  const svn_io_dirent2_t *dirent = NULL;
   const char *parent_repos_relpath;
   const char *parent_repos_root_url;
   const char *parent_repos_uuid;
@@ -2783,6 +2808,7 @@ internal_status(svn_wc_status3_t **statu
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
   err = svn_wc__db_read_single_info(&info, db, local_abspath,
+                                    !check_working_copy,
                                     scratch_pool, scratch_pool);
 
   if (err)
@@ -2793,10 +2819,11 @@ internal_status(svn_wc_status3_t **statu
       svn_error_clear(err);
       info = NULL;
 
-      SVN_ERR(svn_io_stat_dirent2(&dirent, local_abspath, FALSE, TRUE,
-                                  scratch_pool, scratch_pool));
+      if (check_working_copy)
+        SVN_ERR(svn_io_stat_dirent2(&dirent, local_abspath, FALSE, TRUE,
+                                    scratch_pool, scratch_pool));
     }
-  else
+  else if (check_working_copy)
     SVN_ERR(stat_wc_dirent_case_sensitive(&dirent, db, local_abspath,
                                           scratch_pool, scratch_pool));
 
@@ -2821,18 +2848,27 @@ internal_status(svn_wc_status3_t **statu
      these values to determine if a node is switched */
   if (!is_root)
     {
-      const char *parent_abspath = svn_dirent_dirname(local_abspath,
-                                                      scratch_pool);
-
-      SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL,
-                                   &parent_repos_relpath,
-                                   &parent_repos_root_url,
-                                   &parent_repos_uuid, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL,
-                                   db, parent_abspath,
-                                   result_pool, scratch_pool));
+      const char *const parent_abspath = svn_dirent_dirname(local_abspath,
+                                                            scratch_pool);
+      if (check_working_copy)
+        SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL,
+                                     &parent_repos_relpath,
+                                     &parent_repos_root_url,
+                                     &parent_repos_uuid,
+                                     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     db, parent_abspath,
+                                     result_pool, scratch_pool));
+      else
+        SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL,
+                                         &parent_repos_relpath,
+                                         &parent_repos_root_url,
+                                         &parent_repos_uuid,
+                                         NULL, NULL, NULL, NULL, NULL,
+                                         NULL, NULL, NULL, NULL, NULL,
+                                         db, parent_abspath,
+                                         result_pool, scratch_pool));
     }
   else
     {
@@ -2848,7 +2884,7 @@ internal_status(svn_wc_status3_t **statu
                                          info,
                                          dirent,
                                          TRUE /* get_all */,
-                                         FALSE,
+                                         FALSE, check_working_copy,
                                          NULL /* repos_lock */,
                                          result_pool, scratch_pool));
 }
@@ -2862,8 +2898,9 @@ svn_wc_status3(svn_wc_status3_t **status
                apr_pool_t *scratch_pool)
 {
   return svn_error_trace(
-    internal_status(status, wc_ctx->db, local_abspath, result_pool,
-                    scratch_pool));
+      internal_status(status, wc_ctx->db, local_abspath,
+                      TRUE /* check_working_copy */,
+                      result_pool, scratch_pool));
 }
 
 svn_wc_status3_t *

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed Apr  9 21:16:03 2014
@@ -138,6 +138,20 @@ LEFT OUTER JOIN lock ON nodes.repos_id =
 WHERE wc_id = ?1 AND parent_relpath = ?2
 ORDER BY local_relpath DESC, op_depth DESC
 
+-- STMT_SELECT_BASE_NODE_CHILDREN_INFO
+/* See above re: result ordering. The results of this query must be in
+the same order as returned by STMT_SELECT_NODE_CHILDREN_INFO, because
+read_children_info expects them to be. */
+SELECT op_depth, nodes.repos_id, nodes.repos_path, presence, kind, revision,
+  checksum, translated_size, changed_revision, changed_date, changed_author,
+  depth, symlink_target, last_mod_time, properties, lock_token, lock_owner,
+  lock_comment, lock_date, local_relpath, moved_here, moved_to, file_external
+FROM nodes
+LEFT OUTER JOIN lock ON nodes.repos_id = lock.repos_id
+  AND nodes.repos_path = lock.repos_relpath AND op_depth = 0
+WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = 0
+ORDER BY local_relpath DESC
+
 -- STMT_SELECT_NODE_CHILDREN_WALKER_INFO
 SELECT local_relpath, op_depth, presence, kind
 FROM nodes_current

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Apr  9 21:16:03 2014
@@ -8833,6 +8833,7 @@ read_children_info(svn_wc__db_wcroot_t *
                    const char *dir_relpath,
                    apr_hash_t *conflicts,
                    apr_hash_t *nodes,
+                   svn_boolean_t base_tree_only,
                    apr_pool_t *result_pool,
                    apr_pool_t *scratch_pool)
 {
@@ -8844,7 +8845,9 @@ read_children_info(svn_wc__db_wcroot_t *
   const char *last_repos_root_url = NULL;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_NODE_CHILDREN_INFO));
+                                    (base_tree_only
+                                     ? STMT_SELECT_BASE_NODE_CHILDREN_INFO
+                                     : STMT_SELECT_NODE_CHILDREN_INFO)));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, dir_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
@@ -8859,7 +8862,7 @@ read_children_info(svn_wc__db_wcroot_t *
       int op_depth;
       svn_boolean_t new_child;
 
-      child_item = svn_hash_gets(nodes, name);
+      child_item = (base_tree_only ? NULL : svn_hash_gets(nodes, name));
       if (child_item)
         new_child = FALSE;
       else
@@ -9055,54 +9058,58 @@ read_children_info(svn_wc__db_wcroot_t *
 
   SVN_ERR(svn_sqlite__reset(stmt));
 
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_ACTUAL_CHILDREN_INFO));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, dir_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-  while (have_row)
+  if (!base_tree_only)
     {
-      struct read_children_info_item_t *child_item;
-      struct svn_wc__db_info_t *child;
-      const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
-      const char *name = svn_relpath_basename(child_relpath, NULL);
+      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                        STMT_SELECT_ACTUAL_CHILDREN_INFO));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, dir_relpath));
+      SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-      child_item = svn_hash_gets(nodes, name);
-      if (!child_item)
+      while (have_row)
         {
-          child_item = apr_pcalloc(result_pool, sizeof(*child_item));
-          child_item->info.status = svn_wc__db_status_not_present;
-        }
+          struct read_children_info_item_t *child_item;
+          struct svn_wc__db_info_t *child;
+          const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
+          const char *name = svn_relpath_basename(child_relpath, NULL);
 
-      child = &child_item->info;
+          child_item = svn_hash_gets(nodes, name);
+          if (!child_item)
+            {
+              child_item = apr_pcalloc(result_pool, sizeof(*child_item));
+              child_item->info.status = svn_wc__db_status_not_present;
+            }
+
+          child = &child_item->info;
 
-      child->changelist = svn_sqlite__column_text(stmt, 1, result_pool);
+          child->changelist = svn_sqlite__column_text(stmt, 1, result_pool);
 
-      child->props_mod = !svn_sqlite__column_is_null(stmt, 2);
+          child->props_mod = !svn_sqlite__column_is_null(stmt, 2);
 #ifdef HAVE_SYMLINK
-      if (child->props_mod)
-        {
-          svn_error_t *err;
-          apr_hash_t *properties;
+          if (child->props_mod)
+            {
+              svn_error_t *err;
+              apr_hash_t *properties;
 
-          err = svn_sqlite__column_properties(&properties, stmt, 2,
-                                              scratch_pool, scratch_pool);
-          if (err)
-            SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
-          child->special = (NULL != svn_hash_gets(properties,
-                                                  SVN_PROP_SPECIAL));
-        }
+              err = svn_sqlite__column_properties(&properties, stmt, 2,
+                                                  scratch_pool, scratch_pool);
+              if (err)
+                SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
+              child->special = (NULL != svn_hash_gets(properties,
+                                                      SVN_PROP_SPECIAL));
+            }
 #endif
 
-      child->conflicted = !svn_sqlite__column_is_null(stmt, 3); /* conflict */
+          /* conflict */
+          child->conflicted = !svn_sqlite__column_is_null(stmt, 3);
 
-      if (child->conflicted)
-        svn_hash_sets(conflicts, apr_pstrdup(result_pool, name), "");
+          if (child->conflicted)
+            svn_hash_sets(conflicts, apr_pstrdup(result_pool, name), "");
 
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-    }
+          SVN_ERR(svn_sqlite__step(&have_row, stmt));
+        }
 
-  SVN_ERR(svn_sqlite__reset(stmt));
+      SVN_ERR(svn_sqlite__reset(stmt));
+    }
 
   return SVN_NO_ERROR;
 }
@@ -9112,6 +9119,7 @@ svn_wc__db_read_children_info(apr_hash_t
                               apr_hash_t **conflicts,
                               svn_wc__db_t *db,
                               const char *dir_abspath,
+                              svn_boolean_t base_tree_only,
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool)
 {
@@ -9129,7 +9137,7 @@ svn_wc__db_read_children_info(apr_hash_t
 
   SVN_WC__DB_WITH_TXN(
     read_children_info(wcroot, dir_relpath, *conflicts, *nodes,
-                       result_pool, scratch_pool),
+                       base_tree_only, result_pool, scratch_pool),
     wcroot);
 
   return SVN_NO_ERROR;
@@ -9151,6 +9159,7 @@ static svn_error_t *
 read_single_info(const struct svn_wc__db_info_t **info,
                  svn_wc__db_wcroot_t *wcroot,
                  const char *local_relpath,
+                 svn_boolean_t base_tree_only,
                  apr_pool_t *result_pool,
                  apr_pool_t *scratch_pool)
 {
@@ -9159,19 +9168,37 @@ read_single_info(const struct svn_wc__db
   const svn_checksum_t *checksum;
   const char *original_repos_relpath;
   svn_boolean_t have_work;
+  apr_hash_t *properties;
 
   mtb = apr_pcalloc(result_pool, sizeof(*mtb));
 
-  SVN_ERR(read_info(&mtb->status, &mtb->kind, &mtb->revnum,
-                    &mtb->repos_relpath, &repos_id, &mtb->changed_rev,
-                    &mtb->changed_date, &mtb->changed_author, &mtb->depth,
-                    &checksum, NULL, &original_repos_relpath, NULL, NULL,
-                    &mtb->lock, &mtb->recorded_size, &mtb->recorded_time,
-                    &mtb->changelist, &mtb->conflicted, &mtb->op_root,
-                    &mtb->had_props, &mtb->props_mod, &mtb->have_base,
-                    &mtb->have_more_work, &have_work,
-                    wcroot, local_relpath,
-                    result_pool, scratch_pool));
+  if (!base_tree_only)
+    SVN_ERR(read_info(&mtb->status, &mtb->kind, &mtb->revnum,
+                      &mtb->repos_relpath, &repos_id, &mtb->changed_rev,
+                      &mtb->changed_date, &mtb->changed_author, &mtb->depth,
+                      &checksum, NULL, &original_repos_relpath, NULL, NULL,
+                      &mtb->lock, &mtb->recorded_size, &mtb->recorded_time,
+                      &mtb->changelist, &mtb->conflicted, &mtb->op_root,
+                      &mtb->had_props, &mtb->props_mod, &mtb->have_base,
+                      &mtb->have_more_work, &have_work,
+                      wcroot, local_relpath, result_pool, scratch_pool));
+  else
+    {
+      svn_boolean_t update_root;
+
+      have_work = FALSE;
+      original_repos_relpath = NULL;
+
+      SVN_ERR(svn_wc__db_base_get_info_internal(
+                  &mtb->status, &mtb->kind, &mtb->revnum, &mtb->repos_relpath,
+                  &repos_id, &mtb->changed_rev, &mtb->changed_date,
+                  &mtb->changed_author, &mtb->depth, &checksum, NULL,
+                  &mtb->lock, &mtb->had_props, &properties, &update_root,
+                  wcroot, local_relpath, scratch_pool, scratch_pool));
+
+      mtb->have_base = TRUE;
+      mtb->file_external = (update_root && mtb->kind == svn_node_file);
+    }
 
   /* Query the same rows in the database again for move information */
   if (have_work && (mtb->have_base || mtb->have_more_work))
@@ -9216,7 +9243,8 @@ read_single_info(const struct svn_wc__db
   /* Maybe we have to get some shadowed lock from BASE to make our test suite
      happy... (It might be completely unrelated, but...)
      This queries the same BASE row again, joined to the lock table */
-  if (mtb->have_base && (have_work || mtb->kind == svn_node_file))
+  if (!base_tree_only && mtb->have_base
+      && (have_work || mtb->kind == svn_node_file))
     {
       svn_boolean_t update_root;
       svn_wc__db_lock_t **lock_arg = NULL;
@@ -9249,18 +9277,20 @@ read_single_info(const struct svn_wc__db
 
 #ifdef HAVE_SYMLINK
   if (mtb->kind == svn_node_file
-      && (mtb->had_props || mtb->props_mod))
+      && (mtb->had_props || mtb->props_mod
+          || (base_tree_only && properties)))
     {
-      apr_hash_t *properties;
-
-      if (mtb->props_mod)
-        SVN_ERR(svn_wc__db_read_props_internal(&properties,
-                                               wcroot, local_relpath,
-                                               scratch_pool, scratch_pool));
-      else
-        SVN_ERR(db_read_pristine_props(&properties, wcroot, local_relpath,
-                                       TRUE /* deleted_ok */,
-                                       scratch_pool, scratch_pool));
+      if (!base_tree_only)
+        {
+          if (mtb->props_mod)
+            SVN_ERR(svn_wc__db_read_props_internal(&properties,
+                                                   wcroot, local_relpath,
+                                                   scratch_pool, scratch_pool));
+          else
+            SVN_ERR(db_read_pristine_props(&properties, wcroot, local_relpath,
+                                           TRUE /* deleted_ok */,
+                                           scratch_pool, scratch_pool));
+        }
 
       mtb->special = (NULL != svn_hash_gets(properties, SVN_PROP_SPECIAL));
     }
@@ -9272,7 +9302,7 @@ read_single_info(const struct svn_wc__db
   SVN_ERR(svn_wc__db_fetch_repos_info(&mtb->repos_root_url, &mtb->repos_uuid,
                                       wcroot->sdb, repos_id, result_pool));
 
-  if (mtb->kind == svn_node_dir)
+  if (!base_tree_only && mtb->kind == svn_node_dir)
     SVN_ERR(is_wclocked(&mtb->locked, wcroot, local_relpath, scratch_pool));
 
   *info = mtb;
@@ -9284,6 +9314,7 @@ svn_error_t *
 svn_wc__db_read_single_info(const struct svn_wc__db_info_t **info,
                             svn_wc__db_t *db,
                             const char *local_abspath,
+                            svn_boolean_t base_tree_only,
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool)
 {
@@ -9298,6 +9329,7 @@ svn_wc__db_read_single_info(const struct
   VERIFY_USABLE_WCROOT(wcroot);
 
   SVN_WC__DB_WITH_TXN(read_single_info(info, wcroot, local_relpath,
+                                       base_tree_only,
                                        result_pool, scratch_pool),
                       wcroot);
 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed Apr  9 21:16:03 2014
@@ -1988,21 +1988,29 @@ struct svn_wc__db_info_t {
    The results include any path that was a child of a deleted directory that
    existed at LOCAL_ABSPATH, even if that directory is now scheduled to be
    replaced by the working node at LOCAL_ABSPATH.
+
+   If BASE_TREE_ONLY is set, only information about the BASE tree
+   is returned.
  */
 svn_error_t *
 svn_wc__db_read_children_info(apr_hash_t **nodes,
                               apr_hash_t **conflicts,
                               svn_wc__db_t *db,
                               const char *dir_abspath,
+                              svn_boolean_t base_tree_only,
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 
 /* Like svn_wc__db_read_children_info, but only gets an info node for the root
-   element. */
+   element.
+
+   If BASE_TREE_ONLY is set, only information about the BASE tree
+   is returned. */
 svn_error_t *
 svn_wc__db_read_single_info(const struct svn_wc__db_info_t **info,
                             svn_wc__db_t *db,
                             const char *local_abspath,
+                            svn_boolean_t base_tree_only,
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool);
 

Modified: subversion/trunk/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status-cmd.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status-cmd.c (original)
+++ subversion/trunk/subversion/svn/status-cmd.c Wed Apr  9 21:16:03 2014
@@ -345,10 +345,11 @@ svn_cl__status(apr_getopt_t *os,
 
       /* Retrieve a hash of status structures with the information
          requested by the user. */
-      SVN_ERR(svn_cl__try(svn_client_status5(&repos_rev, ctx, target, &rev,
+      SVN_ERR(svn_cl__try(svn_client_status6(&repos_rev, ctx, target, &rev,
                                              opt_state->depth,
                                              opt_state->verbose,
                                              opt_state->update,
+                                             TRUE /* check_working_copy */,
                                              opt_state->no_ignore,
                                              opt_state->ignore_externals,
                                              FALSE /* depth_as_sticky */,

Modified: subversion/trunk/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/client-test.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/client-test.c Wed Apr  9 21:16:03 2014
@@ -826,6 +826,235 @@ test_suggest_mergesources(const svn_test
   return SVN_NO_ERROR;
 }
 
+
+static char
+status_to_char(enum svn_wc_status_kind status)
+{
+
+  switch (status)
+    {
+    case svn_wc_status_none:        return '.';
+    case svn_wc_status_unversioned: return '?';
+    case svn_wc_status_normal:      return '-';
+    case svn_wc_status_added:       return 'A';
+    case svn_wc_status_missing:     return '!';
+    case svn_wc_status_incomplete:  return ':';
+    case svn_wc_status_deleted:     return 'D';
+    case svn_wc_status_replaced:    return 'R';
+    case svn_wc_status_modified:    return 'M';
+    case svn_wc_status_merged:      return 'G';
+    case svn_wc_status_conflicted:  return 'C';
+    case svn_wc_status_obstructed:  return '~';
+    case svn_wc_status_ignored:     return 'I';
+    case svn_wc_status_external:    return 'X';
+    default:                        return '*';
+    }
+}
+
+static int
+compare_status_paths(const void *a, const void *b)
+{
+  const svn_client_status_t *const *const sta = a;
+  const svn_client_status_t *const *const stb = b;
+  return svn_path_compare_paths((*sta)->local_abspath, (*stb)->local_abspath);
+}
+
+static svn_error_t *
+remote_only_status_receiver(void *baton, const char *path,
+                            const svn_client_status_t *status,
+                            apr_pool_t *scratch_pool)
+{
+  apr_array_header_t *results = baton;
+  APR_ARRAY_PUSH(results, const svn_client_status_t *) =
+    svn_client_status_dup(status, results->pool);
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_remote_only_status(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  static const struct remote_only_status_result
+  {
+    const char *relpath;
+    svn_revnum_t revision;
+    enum svn_wc_status_kind node_status;
+    enum svn_wc_status_kind text_status;
+    enum svn_wc_status_kind prop_status;
+    svn_revnum_t ood_changed_rev;
+    enum svn_wc_status_kind repos_node_status;
+    enum svn_wc_status_kind repos_text_status;
+    enum svn_wc_status_kind repos_prop_status;
+  } expected[] = {
+    { ".",
+      +1, svn_wc_status_normal,   svn_wc_status_normal,   svn_wc_status_none,
+      +2, svn_wc_status_modified, svn_wc_status_modified, svn_wc_status_none },
+    { "B",
+      +1, svn_wc_status_normal,   svn_wc_status_normal,   svn_wc_status_none,
+      +2, svn_wc_status_none,     svn_wc_status_none,     svn_wc_status_none },
+    { "C",
+      +1, svn_wc_status_normal,   svn_wc_status_normal,   svn_wc_status_none,
+      +2, svn_wc_status_deleted,  svn_wc_status_none,     svn_wc_status_none },
+    { "D",
+      +1, svn_wc_status_normal,   svn_wc_status_normal,   svn_wc_status_none,
+      +2, svn_wc_status_none,     svn_wc_status_none,     svn_wc_status_none },
+    { "epsilon",
+      -1, svn_wc_status_none,     svn_wc_status_none,     svn_wc_status_none,
+      +2, svn_wc_status_added,    svn_wc_status_modified, svn_wc_status_none },
+    { "mu",
+      +1, svn_wc_status_normal,   svn_wc_status_normal,   svn_wc_status_none,
+      +2, svn_wc_status_modified, svn_wc_status_normal,   svn_wc_status_none },
+
+    { NULL }
+  };
+
+  const char *repos_url;
+  const char *wc_path;
+  const char *local_path;
+  apr_file_t *local_file;
+  svn_client_ctx_t *ctx;
+  svn_client_mtcc_t *mtcc;
+  svn_opt_revision_t rev;
+  svn_revnum_t result_rev;
+  svn_string_t *contents = svn_string_create("modified\n", pool);
+  svn_stream_t *contentstream = svn_stream_from_string(contents, pool);
+  const struct remote_only_status_result *ex;
+  svn_stream_mark_t *start;
+  apr_array_header_t *targets;
+  apr_array_header_t *results;
+  int i;
+
+  SVN_ERR(svn_stream_mark(contentstream, &start, pool));
+
+  /* Create a filesytem and repository containing the Greek tree. */
+  SVN_ERR(create_greek_repos(&repos_url, "test-remote-only-status", opts, pool));
+
+  SVN_ERR(svn_client_create_context(&ctx, pool));
+
+  /* Make some modifications in the repository, creating revision 2. */
+  SVN_ERR(svn_client_mtcc_create(&mtcc, repos_url, -1, ctx, pool, pool));
+  SVN_ERR(svn_stream_seek(contentstream, start));
+  SVN_ERR(svn_client_mtcc_add_add_file("A/epsilon", contentstream, NULL,
+                                       mtcc, pool));
+  SVN_ERR(svn_stream_seek(contentstream, start));
+  SVN_ERR(svn_client_mtcc_add_update_file("A/mu",
+                                          contentstream, NULL, NULL, NULL,
+                                          mtcc, pool));
+  SVN_ERR(svn_stream_seek(contentstream, start));
+  SVN_ERR(svn_client_mtcc_add_add_file("A/D/epsilon", contentstream, NULL,
+                                       mtcc, pool));
+  SVN_ERR(svn_stream_seek(contentstream, start));
+  SVN_ERR(svn_client_mtcc_add_update_file("A/B/lambda",
+                                          contentstream, NULL, NULL, NULL,
+                                          mtcc, pool));
+  SVN_ERR(svn_client_mtcc_add_delete("A/C", mtcc, pool));
+  SVN_ERR(svn_client_mtcc_commit(NULL, NULL, NULL, mtcc, pool));
+
+  /* Check out a sparse root @r1 of the repository */
+  wc_path = svn_test_data_path("test-remote-only-status-wc", pool);
+  /*svn_test_add_dir_cleanup(wc_path);*/
+  SVN_ERR(svn_io_remove_dir2(wc_path, TRUE, NULL, NULL, pool));
+
+  rev.kind = svn_opt_revision_number;
+  rev.value.number = 1;
+  SVN_ERR(svn_client_checkout3(NULL,
+                               apr_pstrcat(pool, repos_url, "/A", SVN_VA_NULL),
+                               wc_path, &rev, &rev, svn_depth_immediates,
+                               FALSE, FALSE, ctx, pool));
+
+  /* Add a local file; this is a double-check to make sure that
+     remote-only status ignores local changes. */
+  local_path = svn_dirent_join(wc_path, "zeta", pool);
+  SVN_ERR(svn_io_file_create_empty(local_path, pool));
+  SVN_ERR(svn_client_add5(local_path, svn_depth_unknown,
+                          FALSE, FALSE, FALSE, FALSE,
+                          ctx, pool));
+
+  /* Replace a local dir */
+  local_path = svn_dirent_join(wc_path, "B", pool);
+  targets = apr_array_make(pool, 1, sizeof(const char*));
+  APR_ARRAY_PUSH(targets, const char*) = local_path;
+  SVN_ERR(svn_client_delete4(targets, FALSE, FALSE, NULL, NULL, NULL,
+                             ctx, pool));
+  SVN_ERR(svn_client_mkdir4(targets, FALSE, NULL, NULL, NULL,
+                            ctx, pool));
+
+  /* Modify a local dir's props */
+  local_path = svn_dirent_join(wc_path, "D", pool);
+  targets = apr_array_make(pool, 1, sizeof(const char*));
+  APR_ARRAY_PUSH(targets, const char*) = local_path;
+  SVN_ERR(svn_client_propset_local("prop", contents, targets,
+                                   svn_depth_empty, FALSE, NULL,
+                                   ctx, pool));
+
+  /* Modify a local file's contents */
+  local_path = svn_dirent_join(wc_path, "mu", pool);
+  SVN_ERR(svn_io_file_open(&local_file, local_path,
+                           APR_FOPEN_WRITE | APR_FOPEN_TRUNCATE,
+                           0, pool));
+  SVN_ERR(svn_io_file_write_full(local_file,
+                                 contents->data, contents->len,
+                                 NULL, pool));
+  SVN_ERR(svn_io_file_close(local_file, pool));
+
+  /* Run the remote-only status. */
+  results = apr_array_make(pool, 3, sizeof(const svn_client_status_t *));
+  rev.kind = svn_opt_revision_head;
+  SVN_ERR(svn_client_status6(
+              &result_rev, ctx, wc_path, &rev, svn_depth_unknown,
+              TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL,
+              remote_only_status_receiver, results, pool));
+
+  SVN_TEST_ASSERT(result_rev == 2);
+
+  /* Compare the number of results with the expected results */
+  for (i = 0, ex = expected; ex->relpath; ++ex, ++i)
+    ;
+  SVN_TEST_ASSERT(results->nelts == i);
+
+  if (opts->verbose)
+    qsort(results->elts, results->nelts, results->elt_size,
+          compare_status_paths);
+
+  for (i = 0; i < results->nelts; ++i)
+    {
+      const svn_client_status_t *st =
+        APR_ARRAY_IDX(results, i, const svn_client_status_t *);
+
+      const char *relpath =
+        svn_dirent_skip_ancestor(wc_path, st->local_abspath);
+      if (!relpath)
+        relpath = st->local_abspath;
+      if (!*relpath)
+        relpath = ".";
+
+      for (ex = expected; ex->relpath; ++ex)
+        {
+          if (0 == strcmp(relpath, ex->relpath))
+            break;
+        }
+      SVN_TEST_ASSERT(ex->relpath != NULL);
+
+      if (opts->verbose)
+        printf("%c%c%c %2ld  %c%c%c %2ld  %s\n",
+               status_to_char(st->node_status),
+               status_to_char(st->text_status),
+               status_to_char(st->prop_status),
+               (long)st->revision,
+               status_to_char(st->repos_node_status),
+               status_to_char(st->repos_text_status),
+               status_to_char(st->repos_prop_status),
+               (long)st->ood_changed_rev,
+               relpath);
+
+      SVN_TEST_ASSERT(st->revision == ex->revision);
+      SVN_TEST_ASSERT(st->ood_changed_rev == ex->ood_changed_rev);
+      SVN_TEST_ASSERT(st->node_status == ex->node_status);
+      SVN_TEST_ASSERT(st->repos_node_status == ex->repos_node_status);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* ========================================================================== */
 
 
@@ -848,6 +1077,8 @@ static struct svn_test_descriptor_t test
     SVN_TEST_OPTS_PASS(test_youngest_common_ancestor, "test youngest_common_ancestor"),
     SVN_TEST_OPTS_PASS(test_suggest_mergesources,
                        "test svn_client_suggest_merge_sources"),
+    SVN_TEST_OPTS_PASS(test_remote_only_status,
+                       "test svn_client_status6 with ignore_local_mods"),
     SVN_TEST_NULL
   };
 

Propchange: subversion/trunk/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/branches/remote-only-status/subversion/tests/libsvn_fs_x:r1581845-1586090

Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Wed Apr  9 21:16:03 2014
@@ -2772,7 +2772,9 @@ test_children_of_replaced_dir(const svn_
   SVN_ERR(CHECK_ARRAY(children_array, working_children_exc_hidden, pool));
 
   SVN_ERR(svn_wc__db_read_children_info(&children_hash, &conflicts_hash,
-                                        b.wc_ctx->db, A_abspath, pool, pool));
+                                        b.wc_ctx->db, A_abspath,
+                                        FALSE /* base_tree_only */,
+                                        pool, pool));
   SVN_ERR(CHECK_HASH(children_hash, all_children_inc_hidden, pool));
 
   /* We don't yet have a svn_wc__db_read_children_info2() to test. */

Modified: subversion/trunk/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test.h?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test.h (original)
+++ subversion/trunk/subversion/tests/svn_test.h Wed Apr  9 21:16:03 2014
@@ -109,6 +109,7 @@ typedef struct svn_test_opts_t
   /* Minor version to use for servers and FS backends, or zero to use
      the current latest version. */
   int server_minor_version;
+  svn_boolean_t verbose;
   /* Add future "arguments" here. */
 } svn_test_opts_t;
 

Modified: subversion/trunk/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1586146&r1=1586145&r2=1586146&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Wed Apr  9 21:16:03 2014
@@ -853,6 +853,7 @@ svn_test_main(int argc, const char *argv
 #endif
       }
     }
+  opts.verbose = verbose_mode;
 
   /* Disable sleeping for timestamps, to speed up the tests. */
   apr_env_set(