Author: rhuijben
Date: Thu Jan 10 16:28:34 2013
New Revision: 1431486
URL: http://svn.apache.org/viewvc?rev=1431486&view=rev
Log:
During the upgrade of pre-wc-ng working copies to wc-ng, store a bit more
information in the 'below-working' layer, to avoid test run failures with
future status walker improvements.
The information in 'base-deleted' records was not really wrong, but this
stores information more like how wc-ng would do it.
* subversion/libsvn_wc/entries.c
(write_entry):
entry->copied: Also look in parent nodes' below_working layer to find
copyfrom information.
below_working_node: When adding information below a working-delete, copy
the copyfrom and entry information directly instead of guessing based
on just the path.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.c
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1431486&r1=1431485&r2=1431486&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Thu Jan 10 16:28:34 2013
@@ -1778,6 +1778,17 @@ write_entry(struct write_baton **entry_n
working_node->revision = parent_node->work->revision;
working_node->op_depth = parent_node->work->op_depth;
}
+ else if (parent_node->below_work
+ && parent_node->below_work->repos_relpath)
+ {
+ working_node->repos_id = repos_id;
+ working_node->repos_relpath
+ = svn_relpath_join(parent_node->below_work->repos_relpath,
+ svn_relpath_basename(local_relpath, NULL),
+ result_pool);
+ working_node->revision = parent_node->below_work->revision;
+ working_node->op_depth = parent_node->below_work->op_depth;
+ }
else
return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL,
_("No copyfrom URL for '%s'"),
@@ -2082,6 +2093,10 @@ write_entry(struct write_baton **entry_n
below_working_node->presence = svn_wc__db_status_normal;
below_working_node->kind = entry->kind;
below_working_node->repos_id = work->repos_id;
+
+ /* This is just guessing. If the node below would have been switched
+ or if it was updated to a different version, the guess would
+ fail. But we don't have better information pre wc-ng :( */
if (work->repos_relpath)
below_working_node->repos_relpath
= svn_relpath_join(work->repos_relpath, entry->name,
@@ -2111,6 +2126,30 @@ write_entry(struct write_baton **entry_n
below_working_node->depth = svn_depth_infinity;
below_working_node->recorded_time = 0;
below_working_node->properties = NULL;
+
+ if (working_node
+ && entry->schedule == svn_wc_schedule_delete
+ && working_node->repos_relpath)
+ {
+ /* We are lucky, our guesses above are not necessary. The known
+ correct information is in working. But our op_depth design
+ expects more information here */
+ below_working_node->repos_relpath = working_node->repos_relpath;
+ below_working_node->repos_id = working_node->repos_id;
+ below_working_node->revision = working_node->revision;
+
+ /* Nice for 'svn status' */
+ below_working_node->changed_rev = entry->cmt_rev;
+ below_working_node->changed_date = entry->cmt_date;
+ below_working_node->changed_author = entry->cmt_author;
+
+ /* And now remove it from WORKING, because in wc-ng code
+ should read it from the lower layer */
+ working_node->repos_relpath = NULL;
+ working_node->repos_id = 0;
+ working_node->revision = SVN_INVALID_REVNUM;
+ }
+
SVN_ERR(insert_node(sdb, below_working_node, scratch_pool));
}