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/05 02:24:00 UTC
svn commit: r1088832 - /subversion/trunk/subversion/libsvn_wc/node.c
Author: rhuijben
Date: Tue Apr 5 00:24:00 2011
New Revision: 1088832
URL: http://svn.apache.org/viewvc?rev=1088832&view=rev
Log:
* subversion/libsvn_wc/node.c
(svn_wc__node_get_base_rev): When the caller wants to retrieve the base
revision, assume there is a base revision; and only when that fails
look for a working node to avoid an error.
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=1088832&r1=1088831&r2=1088832&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Tue Apr 5 00:24:00 2011
@@ -939,11 +939,23 @@ svn_wc__node_get_base_rev(svn_revnum_t *
const char *local_abspath,
apr_pool_t *scratch_pool)
{
- svn_wc__db_status_t status;
svn_boolean_t have_base;
+ svn_error_t *err;
- SVN_ERR(svn_wc__db_read_info(&status,
- NULL, base_revision,
+ err = svn_wc__db_base_get_info(NULL, NULL, base_revision,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ wc_ctx->db, local_abspath,
+ scratch_pool, scratch_pool);
+
+ if (!err || err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+ return svn_error_return(err);
+
+ svn_error_clear(err);
+
+ SVN_ERR(svn_wc__db_read_info(NULL, NULL, base_revision,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, &have_base, NULL,
@@ -951,21 +963,6 @@ svn_wc__node_get_base_rev(svn_revnum_t *
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
- if (SVN_IS_VALID_REVNUM(*base_revision))
- return SVN_NO_ERROR;
-
- if (have_base)
- {
- /* The node was replaced with something else. Look at the base. */
- SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, base_revision,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- wc_ctx->db, local_abspath,
- scratch_pool, scratch_pool));
- }
-
return SVN_NO_ERROR;
}