You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/27 19:00:25 UTC
svn commit: r1305903 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp
Date: Tue Mar 27 17:00:25 2012
New Revision: 1305903
URL: http://svn.apache.org/viewvc?rev=1305903&view=rev
Log:
Follow-up to r1305800: Fix get_info_for_copy() for callers passing NULL status.
* subversion/libsvn_wc/wc_db.c
(get_info_for_copy): Store the node's status in a local variable so this
function can do its job if the caller passes a NULL status output parameter.
Suggested by: gstein
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=1305903&r1=1305902&r2=1305903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Mar 27 17:00:25 2012
@@ -3414,8 +3414,9 @@ get_info_for_copy(apr_int64_t *copyfrom_
{
const char *repos_relpath;
svn_revnum_t revision;
+ svn_wc__db_status_t node_status;
- SVN_ERR(read_info(status, kind, &revision, &repos_relpath, copyfrom_id,
+ SVN_ERR(read_info(&node_status, kind, &revision, &repos_relpath, copyfrom_id,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, op_root, NULL, NULL,
NULL /* have_base */,
@@ -3423,7 +3424,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
have_work,
wcroot, local_relpath, result_pool, scratch_pool));
- if (status && *status == svn_wc__db_status_excluded)
+ if (node_status == svn_wc__db_status_excluded)
{
/* The parent cannot be excluded, so look at the parent and then
adjust the relpath */
@@ -3439,11 +3440,11 @@ get_info_for_copy(apr_int64_t *copyfrom_
*copyfrom_relpath = svn_relpath_join(*copyfrom_relpath, base_name,
result_pool);
}
- else if (status && *status == svn_wc__db_status_added)
+ else if (node_status == svn_wc__db_status_added)
{
const char *op_root_relpath;
- SVN_ERR(scan_addition(status, &op_root_relpath,
+ SVN_ERR(scan_addition(&node_status, &op_root_relpath,
NULL, NULL, /* repos_* */
copyfrom_relpath, copyfrom_id, copyfrom_rev,
NULL, NULL, NULL, wcroot, local_relpath,
@@ -3457,7 +3458,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
result_pool);
}
}
- else if (status && *status == svn_wc__db_status_deleted)
+ else if (node_status == svn_wc__db_status_deleted)
{
const char *base_del_relpath, *work_del_relpath;
@@ -3501,6 +3502,9 @@ get_info_for_copy(apr_int64_t *copyfrom_
*copyfrom_rev = revision;
}
+ if (status)
+ *status = node_status;
+
return SVN_NO_ERROR;
}