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:41:37 UTC
svn commit: r1005819 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: rhuijben
Date: Fri Oct 8 13:41:37 2010
New Revision: 1005819
URL: http://svn.apache.org/viewvc?rev=1005819&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
(svn_wc__db_read_info): Only retrieve lock information when we are looking
at op_depth 0 (aka BASE), as only in that specific case we are looking at
a node that is in the repository. (The old value is still available via
_base_get_info(), which explicitly looks at the overlayed node.)
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1005819&r1=1005818&r2=1005819&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Oct 8 13:41:37 2010
@@ -4564,10 +4564,28 @@ svn_wc__db_read_info(svn_wc__db_status_t
*conflicted = FALSE;
}
+ if (lock)
+ {
+ if (op_depth != 0 || svn_sqlite__column_is_null(stmt_info, 15))
+ *lock = NULL;
+ else
+ {
+ *lock = apr_pcalloc(result_pool, sizeof(svn_wc__db_lock_t));
+ (*lock)->token = svn_sqlite__column_text(stmt_info, 15,
+ result_pool);
+ (*lock)->owner = svn_sqlite__column_text(stmt_info, 16,
+ result_pool);
+ (*lock)->comment = svn_sqlite__column_text(stmt_info, 17,
+ result_pool);
+ if (!svn_sqlite__column_is_null(stmt_info, 18))
+ (*lock)->date = svn_sqlite__column_int64(stmt_info, 18);
+ }
+ }
+
if (have_work)
*have_work = (op_depth != 0);
- if (have_base || lock)
+ if (have_base)
{
while (!err && op_depth != 0)
{
@@ -4581,27 +4599,6 @@ svn_wc__db_read_info(svn_wc__db_status_t
if (have_base)
*have_base = (op_depth == 0);
-
- /* Lock should only be checked when the top op_depth is 0, but that
- is a behavior change which has to be handled as a separate commit
- */
- if (lock)
- {
- if (op_depth != 0 || svn_sqlite__column_is_null(stmt_info, 15))
- *lock = NULL;
- else
- {
- *lock = apr_pcalloc(result_pool, sizeof(svn_wc__db_lock_t));
- (*lock)->token = svn_sqlite__column_text(stmt_info, 15,
- result_pool);
- (*lock)->owner = svn_sqlite__column_text(stmt_info, 16,
- result_pool);
- (*lock)->comment = svn_sqlite__column_text(stmt_info, 17,
- result_pool);
- if (!svn_sqlite__column_is_null(stmt_info, 18))
- (*lock)->date = svn_sqlite__column_int64(stmt_info, 18);
- }
- }
}
}
else if (have_act)