Author: julianfoad
Date: Tue Dec 4 21:02:19 2012
New Revision: 1417181
URL: http://svn.apache.org/viewvc?rev=1417181&view=rev
Log:
Remove the function svn_wc__check_wc_root() as it was duplicating the
functionality of svn_wc__db_is_switched() and of the two it was the less
well named (in that it is a 'db' function but didn't have that in its name).
* subversion/libsvn_wc/wc.h
(svn_wc__check_wc_root): Remove.
* subversion/libsvn_wc/wc_db.h
(svn_wc__db_is_switched): Improve the doc string using text from
svn_wc__check_wc_root's doc string.
* subversion/libsvn_wc/update_editor.c
(svn_wc__check_wc_root): Remove.
(svn_wc_get_actual_target2): Track the change.
* subversion/libsvn_wc/crop.c
(svn_wc_exclude): Track the change.
* subversion/libsvn_wc/deprecated.c
(svn_wc_is_wc_root2): Same.
Modified:
subversion/trunk/subversion/libsvn_wc/crop.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/libsvn_wc/wc.h
subversion/trunk/subversion/libsvn_wc/wc_db.h
Modified: subversion/trunk/subversion/libsvn_wc/crop.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/crop.c?rev=1417181&r1=1417180&r2=1417181&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/crop.c (original)
+++ subversion/trunk/subversion/libsvn_wc/crop.c Tue Dec 4 21:02:19 2012
@@ -196,8 +196,8 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
svn_revnum_t revision;
const char *repos_relpath, *repos_root, *repos_uuid;
- SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__db_is_switched(&is_root, &is_switched, NULL,
+ wc_ctx->db, local_abspath, scratch_pool));
if (is_root)
{
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1417181&r1=1417180&r2=1417181&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Dec 4 21:02:19 2012
@@ -3211,8 +3211,8 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
svn_error_t *err;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- err = svn_wc__check_wc_root(&is_root, &kind, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool);
+ err = svn_wc__db_is_switched(&is_root, &is_switched, &kind,
+ wc_ctx->db, local_abspath, scratch_pool);
if (err)
{
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1417181&r1=1417180&r2=1417181&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Dec 4 21:02:19
2012
@@ -5009,20 +5009,6 @@ svn_wc__get_switch_editor(const svn_delt
svn_error_t *
-svn_wc__check_wc_root(svn_boolean_t *wc_root,
- svn_kind_t *kind,
- svn_boolean_t *switched,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool)
-{
- return svn_error_trace(
- svn_wc__db_is_switched(wc_root, switched, kind,
- db, local_abspath,
- scratch_pool));
-}
-
-svn_error_t *
svn_wc_check_root(svn_boolean_t *is_wcroot,
svn_boolean_t *is_switched,
svn_kind_t *kind,
@@ -5077,9 +5063,9 @@ svn_wc_get_actual_target2(const char **a
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
- err = svn_wc__check_wc_root(&is_wc_root, &kind, &is_switched,
- wc_ctx->db, local_abspath,
- scratch_pool);
+ err = svn_wc__db_is_switched(&is_wc_root, &is_switched, &kind,
+ wc_ctx->db, local_abspath,
+ scratch_pool);
if (err)
{
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1417181&r1=1417180&r2=1417181&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Tue Dec 4 21:02:19 2012
@@ -641,27 +641,6 @@ svn_wc__wipe_postupgrade(const char *dir
void *cancel_baton,
apr_pool_t *scratch_pool);
-/* Check whether a node is a working copy root or switched.
- *
- * If LOCAL_ABSPATH is the root of a working copy, set *WC_ROOT to TRUE,
- * otherwise to FALSE.
- *
- * If KIND is not null, set *KIND to the node type of LOCAL_ABSPATH.
- *
- * If LOCAL_ABSPATH is switched against its parent in the same working copy
- * set *SWITCHED to TRUE, otherwise to FALSE. SWITCHED can be NULL
- * if the result is not important.
- *
- * Use SCRATCH_POOL for temporary allocations.
- */
-svn_error_t *
-svn_wc__check_wc_root(svn_boolean_t *wc_root,
- svn_kind_t *kind,
- svn_boolean_t *switched,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
-
/* Ensure LOCAL_ABSPATH is still locked in DB. Returns the error
* SVN_ERR_WC_NOT_LOCKED if this is not the case.
*/
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1417181&r1=1417180&r2=1417181&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Tue Dec 4 21:02:19 2012
@@ -2312,13 +2312,20 @@ svn_wc__db_is_wcroot(svn_boolean_t *is_r
const char *local_abspath,
apr_pool_t *scratch_pool);
-/* Checks if LOCAL_ABSPATH is a working copy root, switched and a directory.
- With these answers we can answer all 'is anchor' questions that we need for
- the different ra operations with just a single sqlite transaction and
- filestat.
+/* Check whether a node is a working copy root and/or switched.
- All output arguments can be null to specify that the result is not
- interesting to the caller
+ If LOCAL_ABSPATH is the root of a working copy, set *IS_WC_ROOT to TRUE,
+ otherwise to FALSE.
+
+ If LOCAL_ABSPATH is switched against its parent in the same working copy
+ set *IS_SWITCHED to TRUE, otherwise to FALSE.
+
+ If KIND is not null, set *KIND to the node type of LOCAL_ABSPATH.
+
+ Any of the output arguments can be null to specify that the result is not
+ interesting to the caller.
+
+ Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
svn_wc__db_is_switched(svn_boolean_t *is_wcroot,