You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/09/10 19:15:36 UTC
svn commit: r995875 - in /subversion/trunk/subversion/libsvn_wc:
deprecated.c entries.c entries.h util.c
Author: philip
Date: Fri Sep 10 17:15:36 2010
New Revision: 995875
URL: http://svn.apache.org/viewvc?rev=995875&view=rev
Log:
Remove some multi-db code.
* subversion/libsvn_wc/entries.h
(svn_wc__get_entry): Remove need_parent_stub parameter as all callers
passed FALSE.
* subversion/libsvn_wc/entries.c
(get_entry_access_info): Remove need_parent_stub parameter, remove
assert.
(svn_wc__get_entry): Remove need_parent_stub parameter, remove
assert, remove SVN_ERR_NODE_UNEXPECTED_KIND return.
(svn_wc_walk_entries3): Adjust svn_wc__get_entry call.
* subversion/libsvn_wc/util.c
(svn_wc__status2_from_3): Adjust svn_wc__get_entry call.
* subversion/libsvn_wc/deprecated.c
(svn_wc_get_ancestry, svn_wc__entry_versioned_internal): Adjust
svn_wc__get_entry call.
Modified:
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/entries.h
subversion/trunk/subversion/libsvn_wc/util.c
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=995875&r1=995874&r2=995875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Fri Sep 10 17:15:36 2010
@@ -1128,7 +1128,7 @@ svn_wc_get_ancestry(char **url,
SVN_ERR(svn_wc__get_entry(&entry, svn_wc__adm_get_db(adm_access),
local_abspath, FALSE,
- svn_node_unknown, FALSE,
+ svn_node_unknown,
pool, pool));
if (url)
@@ -3911,7 +3911,6 @@ svn_wc__entry_versioned_internal(const s
SVN_ERR(svn_wc__get_entry_versioned(entry, svn_wc__adm_get_db(adm_access),
local_abspath, svn_node_unknown,
show_hidden,
- FALSE, /* NEED_PARENT_STUB */
pool, pool));
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=995875&r1=995874&r2=995875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Sep 10 17:15:36 2010
@@ -1254,7 +1254,7 @@ read_entries(apr_hash_t **entries,
which the entry information is located, and *ENTRY_NAME to the entry name
to access that entry.
- KIND and NEED_PARENT_STUB are as in svn_wc__get_entry().
+ KIND is as in svn_wc__get_entry().
Return the results in RESULT_POOL and use SCRATCH_POOL for temporary
allocations. */
@@ -1264,16 +1264,12 @@ get_entry_access_info(const char **adm_a
svn_wc__db_t *db,
const char *local_abspath,
svn_node_kind_t kind,
- svn_boolean_t need_parent_stub,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_wc_adm_access_t *adm_access;
svn_boolean_t read_from_subdir = FALSE;
- /* Can't ask for the parent stub if the node is a file. */
- SVN_ERR_ASSERT(!need_parent_stub || kind != svn_node_file);
-
/* If the caller didn't know the node kind, then stat the path. Maybe
it is really there, and we can speed up the steps below. */
if (kind == svn_node_unknown)
@@ -1317,10 +1313,10 @@ get_entry_access_info(const char **adm_a
{
/* We found a directory for this UNKNOWN node. Determine whether
we need to read inside it. */
- read_from_subdir = !need_parent_stub;
+ read_from_subdir = TRUE;
}
}
- else if (kind == svn_node_dir && !need_parent_stub)
+ else if (kind == svn_node_dir)
{
read_from_subdir = TRUE;
}
@@ -1350,19 +1346,14 @@ svn_wc__get_entry(const svn_wc_entry_t *
const char *local_abspath,
svn_boolean_t allow_unversioned,
svn_node_kind_t kind,
- svn_boolean_t need_parent_stub,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const char *dir_abspath;
const char *entry_name;
- /* Can't ask for the parent stub if the node is a file. */
- SVN_ERR_ASSERT(!need_parent_stub || kind != svn_node_file);
-
SVN_ERR(get_entry_access_info(&dir_abspath, &entry_name, db, local_abspath,
- kind, need_parent_stub, scratch_pool,
- scratch_pool));
+ kind, scratch_pool, scratch_pool));
{
const svn_wc_entry_t *parent_entry;
@@ -1411,8 +1402,7 @@ svn_wc__get_entry(const svn_wc_entry_t *
Redo the fetch, but "insist" we are trying to find a file.
This will read from the parent directory of the "file". */
err = svn_wc__get_entry(entry, db, local_abspath, allow_unversioned,
- svn_node_file, FALSE,
- result_pool, scratch_pool);
+ svn_node_file, result_pool, scratch_pool);
if (err == SVN_NO_ERROR)
return SVN_NO_ERROR;
if (err->apr_err != SVN_ERR_NODE_UNEXPECTED_KIND)
@@ -1450,25 +1440,6 @@ svn_wc__get_entry(const svn_wc_entry_t *
svn_dirent_local_style(local_abspath,
scratch_pool));
- if (kind == svn_node_unknown)
- {
- /* They wanted a (directory) stub, but this isn't a directory. */
- if (need_parent_stub && (*entry)->kind != svn_node_dir)
- return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
- _("'%s' is not of the right kind"),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
-
- /* The actual (directory) information was wanted, but we got a stub. */
- if (!need_parent_stub
- && (*entry)->kind == svn_node_dir
- && *(*entry)->name != '\0')
- return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
- _("'%s' is not of the right kind"),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
- }
-
return SVN_NO_ERROR;
}
@@ -2683,7 +2654,7 @@ svn_wc_walk_entries3(const char *path,
}
SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, FALSE,
- svn_node_file, FALSE, pool, pool));
+ svn_node_file, pool, pool));
err = walk_callbacks->found_entry(path, entry, walk_baton, pool);
if (err)
Modified: subversion/trunk/subversion/libsvn_wc/entries.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.h?rev=995875&r1=995874&r2=995875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.h (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.h Fri Sep 10 17:15:36 2010
@@ -52,19 +52,9 @@ extern "C" {
* If you specify FILE/DIR, and the entry is *something else*, then
* SVN_ERR_NODE_UNEXPECTED_KIND will be returned.
*
- * For directory nodes, sometimes the caller may want the "stub" from the
- * parent directory. This is usually to examine the DELETED flag. When
- * this is desired, pass TRUE for NEED_PARENT_STUB. It is illegal to pass
- * TRUE if KIND == FILE.
- *
* If KIND == UNKNOWN, and you request the parent stub, and the node turns
* out to NOT be a directory, then SVN_ERR_NODE_UNEXPECTED_KIND is returned.
*
- * If KIND == UNKNOWN, and you request the actual file/dir data (by setting
- * NEED_PARENT_STUB to FALSE), and the node turns out to be a DIR (as
- * specified by the parent), but the subdirectory is NOT present (obstructed
- * or missing), then SVN_ERR_NODE_UNEXPECTED_KIND is returned.
- *
* NOTE: if SVN_ERR_NODE_UNEXPECTED_KIND is returned, then the ENTRY *IS*
* valid and may be examined. For any other error, ENTRY *IS NOT* valid.
*
@@ -81,7 +71,6 @@ svn_wc__get_entry(const svn_wc_entry_t *
const char *local_abspath,
svn_boolean_t allow_unversioned,
svn_node_kind_t kind,
- svn_boolean_t need_parent_stub,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=995875&r1=995874&r2=995875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Fri Sep 10 17:15:36 2010
@@ -532,8 +532,7 @@ svn_wc__status2_from_3(svn_wc_status2_t
{
svn_error_t *err;
err= svn_wc__get_entry(&entry, wc_ctx->db, local_abspath, FALSE,
- svn_node_unknown, FALSE, result_pool,
- scratch_pool);
+ svn_node_unknown, result_pool, scratch_pool);
if (err && err->apr_err == SVN_ERR_NODE_UNEXPECTED_KIND)
svn_error_clear(err);