Author: rhuijben
Date: Thu Apr 14 22:30:31 2011
New Revision: 1092537
URL: http://svn.apache.org/viewvc?rev=1092537&view=rev
Log:
Don't hide property changes on missing and obstructed directories from the
status walk, when we already have all the information to report this.
* subversion/libsvn_wc/status.c
(assemble_status): Return property status even when a node is missing or
obstructed. Only perform text modified checks if they can return something
useful.
* subversion/libsvn_wc/update_editor.c
(modcheck_callback): A missing or obstructed node can have property changes.
* subversion/tests/cmdline/prop_tests.py
(obstructed_subdirs): A missing and an obstructed directory don't lose
their property changes in WC-NG.
Modified:
subversion/trunk/subversion/libsvn_wc/status.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/tests/cmdline/prop_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1092537&r1=1092536&r2=1092537&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Thu Apr 14 22:30:31 2011
@@ -463,17 +463,30 @@ assemble_status(svn_wc_status3_t **statu
}
}
+ /* Does the node have props? */
+ {
+ svn_boolean_t has_props;
+ if (info->status == svn_wc__db_status_deleted)
+ has_props = FALSE; /* Not interesting */
+ else if (info->props_mod)
+ has_props = TRUE;
+ else
+ has_props = info->has_props;
+
+ /* If the entry has a properties, see if it has local changes. */
+ if (has_props)
+ prop_status = info->props_mod ? svn_wc_status_modified
+ : svn_wc_status_normal;
+ }
+
/* If NODE_STATUS is still normal, after the above checks, then
we should proceed to refine the status.
If it was changed, then the subdir is incomplete or missing/obstructed.
- It means that no further information is available, and we should skip
- all this work. */
- if (node_status == svn_wc_status_normal
- || (node_status == svn_wc_status_missing
- && info->kind != svn_wc__db_kind_dir))
+ */
+ if (info->kind != svn_wc__db_kind_dir
+ && node_status == svn_wc_status_normal)
{
- svn_boolean_t has_props;
svn_boolean_t text_modified_p = FALSE;
/* Implement predecence rules: */
@@ -482,29 +495,9 @@ assemble_status(svn_wc_status3_t **statu
Together, these two stati are of lowest precedence, and C has
precedence over M. */
- /* Does the node have props? */
- if (info->status == svn_wc__db_status_deleted)
- has_props = FALSE; /* Not interesting */
- else if (info->props_mod)
- has_props = TRUE;
- else
- has_props = info->has_props;
-
- if (has_props)
- prop_status = svn_wc_status_normal;
-
- /* If the entry has a properties, see if it has local changes. */
- if (has_props)
- prop_status = info->props_mod ? svn_wc_status_modified
- : svn_wc_status_normal;
-
- /* ### Don't read properties twice! Cache wc_special in
- svn_wc__db_read_children_info. */
-
/* If the entry is a file, check for textual modifications */
- if (node_status != svn_wc_status_missing
- && (info->kind == svn_wc__db_kind_file
- || info->kind == svn_wc__db_kind_symlink)
+ if ((info->kind == svn_wc__db_kind_file
+ || info->kind == svn_wc__db_kind_symlink)
#ifdef HAVE_SYMLINK
&& (info->special == (dirent && dirent->special))
#endif /* HAVE_SYMLINK */
@@ -548,7 +541,6 @@ assemble_status(svn_wc_status3_t **statu
node_status = svn_wc_status_obstructed;
#endif /* HAVE_SYMLINK */
-
if (text_modified_p)
text_status = svn_wc_status_modified;
}
@@ -2389,8 +2381,6 @@ svn_wc__internal_walk_status(svn_wc__db_
const svn_io_dirent2_t *dirent;
const char *anchor_abspath, *target_name;
svn_boolean_t skip_root;
- svn_error_t *err;
- svn_wc__db_status_t status;
svn_wc__db_kind_t kind;
wb.db = db;
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1092537&r1=1092536&r2=1092537&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Apr 14 22:30:31
2011
@@ -1190,7 +1190,6 @@ modcheck_callback(void *baton,
switch (status->node_status)
{
case svn_wc_status_normal:
- case svn_wc_status_obstructed:
case svn_wc_status_ignored:
case svn_wc_status_none:
case svn_wc_status_unversioned:
@@ -1200,6 +1199,12 @@ modcheck_callback(void *baton,
mb->found_mod = TRUE;
break;
+ case svn_wc_status_missing:
+ case svn_wc_status_obstructed:
+ if (status->prop_status != svn_wc_status_modified)
+ break;
+ /* Fall through in the found modification case */
+
default:
case svn_wc_status_added:
case svn_wc_status_replaced:
Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/prop_tests.py?rev=1092537&r1=1092536&r2=1092537&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Thu Apr 14 22:30:31
2011
@@ -1968,26 +1968,15 @@ def obstructed_subdirs(sbox):
expected_disk.old_tree())
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- if svntest.main.wc_is_singledb(wc_dir):
- expected_status.tweak('A/C', status='! ', wc_rev='1')
- else:
- expected_status.tweak('A/C', status='! ', wc_rev='?')
+ expected_status.tweak('A/C', status='!M', wc_rev='1')
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Drop an empty file there to obstruct the now-deleted subdir
open(C_path, 'w')
- # Single-DB doesn't lose properties
- if svntest.main.wc_is_singledb(wc_dir):
- expected_disk.add({'A/C': Item(contents='', props={'red': 'blue'})})
- expected_status.tweak('A/C', status='~ ', wc_rev='1')
- else:
- expected_disk.add({'A/C': Item(contents='')})
-
- # NOTE: r943346 fixes a problem with reporter processing, which
- # is necessary for this status to complete properly.
- expected_status.tweak('A/C', status='~ ', wc_rev='?')
+ expected_disk.add({'A/C': Item(contents='', props={'red': 'blue'})})
+ expected_status.tweak('A/C', status='~M', wc_rev='1')
actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, load_props=True)
svntest.tree.compare_trees("disk", actual_disk_tree,