You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/05/18 23:16:21 UTC
svn commit: r945890 - /subversion/trunk/subversion/libsvn_wc/props.c
Author: gstein
Date: Tue May 18 21:16:20 2010
New Revision: 945890
URL: http://svn.apache.org/viewvc?rev=945890&view=rev
Log:
Another tweak to svn_wc__props_modified(). We can use load_actual_props()
and load_pristine_props(), but we have to throw out the "replaced" check.
On today's working copies, the check is wrong. load_actual_props will
return "the current set of props", which may be a copy of the pristine
props. The load_props call would return NULL if no changes were present.
Thus, we cannot early-out on a replaced node since we must do a comparison
against the pristines to look for changes.
* subversion/libsvn_wc/props.c:
(svn_wc__props_modified): no early-out for LOCALPROPS=NULL since that
will never happen (we at least return an empty set). stub out the
check for a 'replaced' node. remove the alternate implementations for
when USE_DB_PROPS is not defined.
Modified:
subversion/trunk/subversion/libsvn_wc/props.c
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=945890&r1=945889&r2=945890&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Tue May 18 21:16:20 2010
@@ -2696,7 +2696,6 @@ svn_wc__props_modified(svn_boolean_t *mo
apr_hash_t *baseprops;
svn_wc__db_status_t status;
svn_error_t *err;
- svn_boolean_t replaced;
err = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -2715,41 +2714,35 @@ svn_wc__props_modified(svn_boolean_t *mo
else if (err)
return err;
-#ifdef USE_DB_PROPS
SVN_ERR(load_actual_props(&localprops, db, local_abspath,
scratch_pool, scratch_pool));
-#else
- SVN_ERR(load_props(&localprops, db, local_abspath, svn_wc__props_working,
- scratch_pool));
-#endif
-
- /* If the WORKING props are not present, then no modifications have
- occurred. */
- if (localprops == NULL)
- {
- *modified_p = FALSE;
- return SVN_NO_ERROR;
- }
+ SVN_ERR_ASSERT(localprops != NULL);
- /* If something is scheduled for replacement, we do *not* want to
- pay attention to any base-props; they might be residual from the
- old deleted file. */
- /* ### in modern WC formats, they should be the replaced file's
- ### base props. hard to know on old WCs tho? (given the above
- ### comment). just declare propmods if the node has any working
- ### properties. */
- SVN_ERR(svn_wc__internal_is_replaced(&replaced, db, local_abspath,
- scratch_pool));
- if (replaced)
- {
- *modified_p = apr_hash_count(localprops) > 0;
- return SVN_NO_ERROR;
- }
+ /* ### this should not apply nowadays. especially if USE_DB_PROPS. */
+#if 0
+ {
+ svn_boolean_t replaced;
+
+ /* If something is scheduled for replacement, we do *not* want to
+ pay attention to any base-props; they might be residual from the
+ old deleted file. */
+ /* ### in modern WC formats, they should be the replaced file's
+ ### base props. hard to know on old WCs tho? (given the above
+ ### comment). just declare propmods if the node has any working
+ ### properties. */
+ SVN_ERR(svn_wc__internal_is_replaced(&replaced, db, local_abspath,
+ scratch_pool));
+ if (replaced)
+ {
+ *modified_p = apr_hash_count(localprops) > 0;
+ return SVN_NO_ERROR;
+ }
+ }
+#endif
/* The WORKING props are present, so let's dig in and see what the
differences are. On really old WCs, they might be the same. On
newer WCs, the file would have been removed if there was no delta. */
-#ifdef USE_DB_PROPS
SVN_ERR(load_pristine_props(&baseprops, db, local_abspath,
scratch_pool, scratch_pool));
if (baseprops == NULL)
@@ -2759,10 +2752,6 @@ svn_wc__props_modified(svn_boolean_t *mo
*modified_p = apr_hash_count(localprops) > 0;
return SVN_NO_ERROR;
}
-#else
- SVN_ERR(load_props(&baseprops, db, local_abspath, svn_wc__props_base,
- scratch_pool));
-#endif
SVN_ERR(svn_prop_diffs(&local_propchanges, localprops, baseprops,
scratch_pool));