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 2013/02/24 16:00:23 UTC

svn commit: r1449490 - /subversion/trunk/subversion/libsvn_client/util.c

Author: rhuijben
Date: Sun Feb 24 15:00:23 2013
New Revision: 1449490

URL: http://svn.apache.org/r1449490
Log:
Use new read_kind api for editor v2 shim.

Add comments to note that these functions look in WORKING instead
of BASE, so the values are only valid for status 'normal' nodes,
when used for update, switch and repos-wc diff handling.

* subversion/libsvn_client/util.c
  (fetch_props_func): Add comment that this thinks of the WC like a
    pre 1.4 working copy where we didn't allow nodes to be replaced.
  (fetch_kind_func): Use new api. Add comment that this thinks of the
    WC like a pre 1.4 working copy where we didn't allow nodes to be
    replaced.
  (fetch_base_func): Add comment that this thinks of the WC like a
    pre 1.4 working copy where we didn't allow nodes to be replaced.

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

Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1449490&r1=1449489&r2=1449490&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Sun Feb 24 15:00:23 2013
@@ -355,6 +355,7 @@ fetch_props_func(apr_hash_t **props,
       return SVN_NO_ERROR;
     }
 
+  /* Reads the pristine properties of WORKING, not those of BASE */
   SVN_ERR(svn_wc_get_pristine_props(props, scb->wc_ctx, local_abspath,
                                     result_pool, scratch_pool));
 
@@ -372,7 +373,6 @@ fetch_kind_func(svn_kind_t *kind,
                 apr_pool_t *scratch_pool)
 {
   struct shim_callbacks_baton *scb = baton;
-  svn_node_kind_t node_kind;
   const char *local_abspath;
 
   local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
@@ -382,9 +382,9 @@ fetch_kind_func(svn_kind_t *kind,
       return SVN_NO_ERROR;
     }
 
-  SVN_ERR(svn_wc_read_kind(&node_kind, scb->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+  /* Reads the WORKING kind. Not the BASE kind */
+  SVN_ERR(svn_wc_read_kind2(kind, scb->wc_ctx, local_abspath, FALSE,
+                            scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -410,6 +410,7 @@ fetch_base_func(const char **filename,
       return SVN_NO_ERROR;
     }
 
+  /* Reads the pristine of WORKING, not of BASE */
   err = svn_wc_get_pristine_contents2(&pristine_stream, scb->wc_ctx,
                                       local_abspath, scratch_pool,
                                       scratch_pool);