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/13 17:56:53 UTC
svn commit: r954251 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c
entries.c node.c
Author: rhuijben
Date: Sun Jun 13 15:56:52 2010
New Revision: 954251
URL: http://svn.apache.org/viewvc?rev=954251&view=rev
Log:
When adding a new node over a not present base node, we shouldn't change
the base nodes revision to 0. For compatibility we compensate in the
readers.
* subversion/libsvn_wc/adm_ops.c
(svn_wc_add4): Don't set the base node revision to 0.
* subversion/libsvn_wc/entries.c
(read_one_entry): Set revision to 0 if the working node doesn't imply
a revision and the base node is not-present.
* subversion/libsvn_wc/node.c
(svn_wc__node_get_working_rev_info): Don't retrieve base node information when
the working node information is good enough. Never retrieve a base node
revision as override when the base status is not-present.
Modified:
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=954251&r1=954250&r2=954251&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Sun Jun 13 15:56:52 2010
@@ -1681,12 +1681,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
tmp_entry.kind = kind;
modify_flags = SVN_WC__ENTRY_MODIFY_SCHEDULE | SVN_WC__ENTRY_MODIFY_KIND;
- if (! (is_replace || copyfrom_url))
- {
- tmp_entry.revision = 0;
- modify_flags |= SVN_WC__ENTRY_MODIFY_REVISION;
- }
-
/* If a copy ancestor was given, make sure the copyfrom URL is in the same
repository (if possible) and put the proper ancestry info in the new
entry */
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=954251&r1=954250&r2=954251&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Sun Jun 13 15:56:52 2010
@@ -808,6 +808,13 @@ read_one_entry(const svn_wc_entry_t **ne
db,
entry_abspath,
result_pool, scratch_pool));
+
+ /* In wc.db we want to keep the valid revision of the not-present
+ BASE_REV, but when we used entries we set the revision to 0
+ when adding a new node over a not present base node. */
+ if (work_status == svn_wc__db_status_added
+ && entry->deleted)
+ entry->revision = 0;
}
if (!SVN_IS_VALID_REVNUM(entry->cmt_rev)
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=954251&r1=954250&r2=954251&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sun Jun 13 15:56:52 2010
@@ -884,6 +884,9 @@ svn_wc__node_get_working_rev_info(svn_re
NULL, wc_ctx->db, local_abspath, result_pool,
scratch_pool));
+ if (SVN_IS_VALID_REVNUM(*changed_rev) && SVN_IS_VALID_REVNUM(*revision))
+ return SVN_NO_ERROR; /* We got everything we need */
+
if (status == svn_wc__db_status_deleted)
{
const char *work_del_abspath = NULL;
@@ -916,11 +919,21 @@ svn_wc__node_get_working_rev_info(svn_re
}
else if (base_shadowed)
{
- SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, revision, NULL, NULL,
+ svn_wc__db_status_t base_status;
+ svn_revnum_t base_rev;
+ SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, &base_rev, NULL, NULL,
NULL, changed_rev, changed_date,
changed_author, NULL, NULL, NULL,
NULL, NULL, NULL, wc_ctx->db, local_abspath,
result_pool, scratch_pool));
+
+ if (revision && !SVN_IS_VALID_REVNUM(*revision)
+ && base_status != svn_wc__db_status_not_present)
+ {
+ /* When we used entries we reset the revision to 0 when we added a new
+ node over an existing not present node */
+ *revision = base_rev;
+ }
}
return SVN_NO_ERROR;
}