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/06/30 14:23:32 UTC
svn commit: r959278 - /subversion/trunk/subversion/libsvn_wc/node.c
Author: rhuijben
Date: Wed Jun 30 12:23:32 2010
New Revision: 959278
URL: http://svn.apache.org/viewvc?rev=959278&view=rev
Log:
Following up on r959270, fix a few cases where the schedule calculation
didn't handle replacements correctly.
* subversion/libsvn_wc/node.c
(svn_wc__internal_node_get_schedule): Also check for replacements on local
additions and allow replacements to be scheduled as normal if they aren't
the operation root. Bail when the parent is a local addition.
Modified:
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=959278&r1=959277&r2=959278&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Wed Jun 30 12:23:32 2010
@@ -1283,10 +1283,7 @@ svn_wc__internal_node_get_schedule(svn_w
db, local_abspath,
scratch_pool, scratch_pool));
- if (status == svn_wc__db_status_added)
- break;
-
- if (copied)
+ if (copied && status != svn_wc__db_status_added)
*copied = TRUE;
if (!schedule)
@@ -1294,20 +1291,21 @@ svn_wc__internal_node_get_schedule(svn_w
if (has_base)
{
- SVN_ERR(svn_wc__db_base_get_info(&status, NULL, NULL, NULL,
+ svn_wc__db_status_t base_status;
+ SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL,
db, local_abspath,
scratch_pool, scratch_pool));
- if (status != svn_wc__db_status_not_present)
- {
- *schedule = svn_wc_schedule_replace;
- break;
- }
+ if (base_status != svn_wc__db_status_not_present)
+ *schedule = svn_wc_schedule_replace;
}
+ if (status == svn_wc__db_status_added)
+ break; /* Local addition */
+
/* Determine the parent status to check if we should show the
schedule of a child of a copy as normal. */
if (strcmp(op_root_abspath, local_abspath) != 0)
@@ -1330,7 +1328,7 @@ svn_wc__internal_node_get_schedule(svn_w
scratch_pool, scratch_pool));
if (status != svn_wc__db_status_added)
- break;
+ break; /* Parent was not added */
if (!parent_copyfrom_relpath)
{
@@ -1341,6 +1339,9 @@ svn_wc__internal_node_get_schedule(svn_w
db, parent_abspath,
scratch_pool, scratch_pool));
+ if (!parent_copyfrom_relpath)
+ break; /* Parent is a local addition */
+
parent_copyfrom_relpath = svn_relpath_join(
parent_copyfrom_relpath,
svn_dirent_is_child(op_root_abspath,
@@ -1355,7 +1356,7 @@ svn_wc__internal_node_get_schedule(svn_w
if (!child_name
|| strcmp(child_name, svn_dirent_basename(local_abspath, NULL)))
- break;
+ break; /* Different operation */
*schedule = svn_wc_schedule_normal;
break;
Re: svn commit: r959278 - /subversion/trunk/subversion/libsvn_wc/node.c
Posted by Greg Stein <gs...@gmail.com>.
On Wed, Jun 30, 2010 at 08:23, <rh...@apache.org> wrote:
> Author: rhuijben
> Date: Wed Jun 30 12:23:32 2010
> New Revision: 959278
>
> URL: http://svn.apache.org/viewvc?rev=959278&view=rev
> Log:
> Following up on r959270, fix a few cases where the schedule calculation
> didn't handle replacements correctly.
Told ya. Just rip out all the code and use entry->schedule.
>...
Cheers,
-g