Author: rhuijben
Date: Sun Feb 24 15:58:58 2013
New Revision: 1449499
URL: http://svn.apache.org/r1449499
Log:
Following up on r1449482, revert the introduction of svn_kind_t in
libsvn_client via svn_read_kind2. We still use svn_node_kind_t for ra
and local disk and this close to releasing 1.8 this requires to much changes.
(Going through the deprecated cases, more and more places had to convert
between types)
We will probably have to rev this function again when really reporting
symlinks as proper symlinks anyway, to fix all usages.
* subversion/include/svn_wc.h
(svn_wc_read_kind2): Update argument and documentation. Remove invalid
section on kind unknown as we never passed that on via this function.
* subversion/libsvn_client/util.c
(fetch_kind_func): Update caller.
* subversion/libsvn_wc/deprecated.c
(svn_wc_read_kind): Update caller.
* subversion/libsvn_wc/node.c
(svn_wc_read_kind2): Update output argument type.
Modified:
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_client/util.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1449499&r1=1449498&r2=1449499&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Sun Feb 24 15:58:58 2013
@@ -8104,37 +8104,33 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
/** @} */
/**
- * Set @a kind to the #svn_kind_t of @a abspath. Use @a wc_ctx to access
+ * Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx to access
* the working copy, and @a scratch_pool for all temporary allocations.
*
* If @a abspath is not under version control, set @a kind to #svn_kind_none.
*
* If @a show_hidden and @a show_deleted are both @c FALSE, the kind of
* scheduled for delete, administrative only 'not present' and excluded
- * nodes is reported as #svn_kind_node. This is recommended as a check for
- * 'is there a versioned file or directory here?'
+ * nodes is reported as #svn_node_kind_node. This is recommended as a check
+ * for 'is there a versioned file or directory here?'
*
* If @a show_deleted is FALSE, but @a show_hidden is @c TRUE then only
* scheduled for delete and administrative only 'not present' nodes are
- * reported as #svn_kind_none. This is recommended as check for
+ * reported as #svn_node_kind_none. This is recommended as check for
* 'Can I add a node here?'
*
* If @a show_deleted is TRUE, but @a show_hidden is FALSE, then only
* administrative only 'not present' nodes and excluded nodes are reported as
- * #svn_kind_none. This behavior is the behavior bescribed as 'hidden'
+ * #svn_node_kind_none. This behavior is the behavior bescribed as 'hidden'
* before Subversion 1.7.
*
* If @a show_hidden and @a show_deleted are both @c TRUE all nodes are
* reported.
*
- * If the node's info is incomplete, it may or may not have a known node kind
- * set. If the kind is not known (yet), set @a kind to #svn_node_unknown.
- * Otherwise return the node kind even though the node is marked incomplete.
- *
- * @since New in 1.7.
+ * @since New in 1.8.
*/
svn_error_t *
-svn_wc_read_kind2(svn_kind_t *kind,
+svn_wc_read_kind2(svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t show_deleted,
Modified: subversion/trunk/subversion/libsvn_client/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1449499&r1=1449498&r2=1449499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Sun Feb 24 15:58:58 2013
@@ -373,6 +373,7 @@ 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);
@@ -381,10 +382,10 @@ fetch_kind_func(svn_kind_t *kind,
*kind = svn_kind_unknown;
return SVN_NO_ERROR;
}
-
/* Reads the WORKING kind. Not the BASE kind */
- SVN_ERR(svn_wc_read_kind2(kind, scb->wc_ctx, local_abspath, TRUE, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&node_kind, scb->wc_ctx, local_abspath,
+ TRUE, FALSE, scratch_pool));
+ *kind = svn__kind_from_node_kind(node_kind, FALSE);
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1449499&r1=1449498&r2=1449499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Sun Feb 24 15:58:58 2013
@@ -4574,20 +4574,19 @@ svn_wc_read_kind(svn_node_kind_t *kind,
svn_boolean_t show_hidden,
apr_pool_t *scratch_pool)
{
- svn_kind_t db_kind;
-
- SVN_ERR(svn_wc_read_kind2(&db_kind,
+ return svn_error_trace(
+ svn_wc_read_kind2(kind,
wc_ctx, abspath,
TRUE /* show_deleted */,
show_hidden,
scratch_pool));
- if (db_kind == svn_kind_dir)
+ /*if (db_kind == svn_kind_dir)
*kind = svn_node_dir;
else if (db_kind == svn_kind_file || db_kind == svn_kind_symlink)
*kind = svn_node_file;
else
- *kind = svn_node_none;
+ *kind = svn_node_none;*/
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1449499&r1=1449498&r2=1449499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sun Feb 24 15:58:58 2013
@@ -292,20 +292,30 @@ convert_db_kind_to_node_kind(svn_node_ki
}
svn_error_t *
-svn_wc_read_kind2(svn_kind_t *kind,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- svn_boolean_t show_deleted,
- svn_boolean_t show_hidden,
- apr_pool_t *scratch_pool)
+svn_wc_read_kind2(svn_node_kind_t *kind,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t show_deleted,
+ svn_boolean_t show_hidden,
+ apr_pool_t *scratch_pool)
{
- return svn_error_trace(
- svn_wc__db_read_kind(kind,
- wc_ctx->db, local_abspath,
- TRUE /* allow_missing */,
- show_deleted,
- show_hidden,
- scratch_pool));
+ svn_kind_t db_kind;
+
+ SVN_ERR(svn_wc__db_read_kind(&db_kind,
+ wc_ctx->db, local_abspath,
+ TRUE,
+ show_deleted,
+ show_hidden,
+ scratch_pool));
+
+ if (db_kind == svn_kind_dir)
+ *kind = svn_node_dir;
+ else if (db_kind == svn_kind_file || db_kind == svn_kind_symlink)
+ *kind = svn_node_file;
+ else
+ *kind = svn_node_none;
+
+ return SVN_NO_ERROR;
}
svn_error_t *