You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/20 12:58:07 UTC

svn commit: r1095359 - /subversion/trunk/subversion/libsvn_client/status.c

Author: rhuijben
Date: Wed Apr 20 10:58:07 2011
New Revision: 1095359

URL: http://svn.apache.org/viewvc?rev=1095359&view=rev
Log:
Small performance improvement in a few specific 'svn status' scenarios.

* subversion/libsvn_client/status.c
  (tweak_status):
    Don't copy the wc status if we can just tweak the client status.

    Don't retrieve the changelist for every node, when we already have it
    available.

Modified:
    subversion/trunk/subversion/libsvn_client/status.c

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1095359&r1=1095358&r2=1095359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Wed Apr 20 10:58:07 2011
@@ -85,16 +85,6 @@ tweak_status(void *baton,
   const char *path = local_abspath;
   svn_client_status_t *cst;
 
-  /* If we know that the target was deleted in HEAD of the repository,
-     we need to note that fact in all the status structures that come
-     through here. */
-  if (sb->deleted_in_repos)
-    {
-      svn_wc_status3_t *new_status = svn_wc_dup_status3(status, scratch_pool);
-      new_status->repos_node_status = svn_wc_status_deleted;
-      status = new_status;
-    }
-
   if (sb->anchor_abspath)
     path = svn_dirent_join(sb->anchor_relpath,
                            svn_dirent_skip_ancestor(sb->anchor_abspath, path),
@@ -103,13 +93,27 @@ tweak_status(void *baton,
   /* If the status item has an entry, but doesn't belong to one of the
      changelists our caller is interested in, we filter our this status
      transmission.  */
-  if (! svn_wc__changelist_match(sb->wc_ctx, local_abspath,
-                                 sb->changelist_hash, scratch_pool))
-    return SVN_NO_ERROR;
+  if (sb->changelist_hash
+      && (! status->changelist
+          || ! apr_hash_get(sb->changelist_hash, status->changelist,
+                            APR_HASH_KEY_STRING)))
+    {
+      return SVN_NO_ERROR;
+    }
 
   SVN_ERR(create_client_status(&cst, sb->wc_ctx, local_abspath, status,
                                scratch_pool, scratch_pool));
 
+  /* If we know that the target was deleted in HEAD of the repository,
+     we need to note that fact in all the status structures that come
+     through here. */
+  if (sb->deleted_in_repos)
+    {
+      svn_wc_status3_t *new_status = svn_wc_dup_status3(status, scratch_pool);
+      new_status->repos_node_status = svn_wc_status_deleted;
+      status = new_status;
+    }
+
   /* Call the real status function/baton. */
   return sb->real_status_func(sb->real_status_baton, path, cst,
                               scratch_pool);