You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/04/26 19:12:12 UTC

svn commit: r938128 - /subversion/trunk/subversion/libsvn_client/prop_commands.c

Author: cmpilato
Date: Mon Apr 26 17:12:12 2010
New Revision: 938128

URL: http://svn.apache.org/viewvc?rev=938128&view=rev
Log:
Continue retiring svn_wc_entry_t usage in libsvn_client.

* subversion/libsvn_client/prop_commands.c
  (propget_walk_cb): Use WC-NG node functions instead of
    svn_wc_entry_t stuffs.

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

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=938128&r1=938127&r2=938128&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Mon Apr 26 17:12:12 2010
@@ -609,24 +609,60 @@ propget_walk_cb(const char *local_abspat
 {
   struct propget_walk_baton *wb = walk_baton;
   const svn_string_t *propval;
-  const svn_wc_entry_t *entry;
 
   /* If our entry doesn't pass changelist filtering, get outta here. */
   if (! svn_wc__changelist_match(wb->wc_ctx, local_abspath,
                                  wb->changelist_hash, pool))
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_wc__maybe_get_entry(&entry, wb->wc_ctx, local_abspath,
-                                  svn_node_unknown, FALSE, FALSE,
-                                  pool, pool));
+  /* If we're looking at pristines, we need nodes that aren't added
+     (that is, there are pristines to look at); otherwise, nodes that
+     aren't deleted (that is, there should be working props).  */
+  if (wb->pristine)
+    {
+      svn_boolean_t is_added;
+      svn_error_t *err;
 
-  if (!entry)
-    return SVN_NO_ERROR;
+      err = svn_wc__node_is_added(&is_added, wb->wc_ctx, local_abspath, pool);
+      if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+        {
+          svn_error_clear(err);
+          return SVN_NO_ERROR;
+        }
+      else if (err)
+        return svn_error_return(err);
 
-  /* Ignore the entry if it does not exist at the time of interest. */
-  if (entry->schedule
-      == (wb->pristine ? svn_wc_schedule_add : svn_wc_schedule_delete))
-    return SVN_NO_ERROR;
+      if (is_added)
+        {
+          svn_boolean_t replaced;
+
+          SVN_ERR(svn_wc__node_is_replaced(&replaced, wb->wc_ctx,
+                                           local_abspath, pool));
+          if (replaced)
+            is_added = FALSE;
+        }
+
+      if (is_added)
+        return SVN_NO_ERROR;
+    }
+  else
+    {
+      svn_boolean_t is_deleted;
+      svn_error_t *err;
+      
+      err = svn_wc__node_is_status_deleted(&is_deleted, wb->wc_ctx,
+                                           local_abspath, pool);
+      if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+        {
+          svn_error_clear(err);
+          return SVN_NO_ERROR;
+        }
+      else if (err)
+        return svn_error_return(err);
+
+      if (is_deleted)
+        return SVN_NO_ERROR;
+   }
 
   SVN_ERR(pristine_or_working_propval(&propval, wb->wc_ctx, local_abspath,
                                       wb->propname, wb->pristine,