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 2010/10/08 15:38:07 UTC

svn commit: r1005817 - /subversion/trunk/subversion/libsvn_wc/node.c

Author: rhuijben
Date: Fri Oct  8 13:38:07 2010
New Revision: 1005817

URL: http://svn.apache.org/viewvc?rev=1005817&view=rev
Log:
In preparation for a behavior change for svn_wc__db_read_info() make
svn_wc__node_get_lock_info() always retrieve lock information for the
BASE_NODE. The only behavior change in this commit is that
svn_wc__node_get_lock_info() stops returning an error for not versioned
nodes, as _read_info() currently retrieves the lock in the same way.

* subversion/libsvn_wc/node.c
  (svn_wc__node_get_lock_info): Use svn_wc__db_base_get_info() instead of
    svn_wc__db_read_info() to retrieve the lock of a node.

Modified:
    subversion/trunk/subversion/libsvn_wc/node.c

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1005817&r1=1005816&r2=1005817&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Fri Oct  8 13:38:07 2010
@@ -1122,14 +1122,22 @@ svn_wc__node_get_lock_info(const char **
                            apr_pool_t *scratch_pool)
 {
   svn_wc__db_lock_t *lock;
+  svn_error_t *err;
 
-  SVN_ERR(svn_wc__db_read_info(NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, &lock,
-                               wc_ctx->db, local_abspath,
-                               result_pool, scratch_pool));
+  err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                 &lock,
+                                 wc_ctx->db, local_abspath,
+                                 result_pool, scratch_pool);
+
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_return(err);
+
+      svn_error_clear(err);
+      lock = NULL;
+    }
   if (lock_token)
     *lock_token = lock ? lock->token : NULL;
   if (lock_owner)