-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kannan wrote:
[..]
Attached herewith is the updated/corrected patch to perform the earlier
proposed functionality.
[[[
Log:
Make `--set-depth (empty|files|immediates) DIR' work, where DIR's depth
had already been set as `exclude'. Only `infinity' works as of now.
* subversion/libsvn_wc/crop.c
(svn_wc_crop_tree2): Check the 'base status' of the node here and
remove the check done using `svn_wc__db_node_hidden()' as it
marks a node as 'hidden' if status is set as
`svn_wc__db_status_excluded'.
* update_editor.c
(complete_directory): Call `svn_wc__set_depth' with the requested
depth rather than `infinity' by default.
* entries.c
(svn_wc__set_depth): Set the entry's depth to the requested one rather
than `infinity' by default if the depth is not `exclude'.
* wc_db.c
(svn_wc__db_temp_op_dir_set_depth): Remove the code which sets the
depth as `infinity' if the depth is not `exclude'.
Patch by: Kannan R <[email protected]>
]]]
- --
Thanks & Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEVAwUBSzoApHlTqcY7ytmIAQJAoAf/fA5eU8enaTiY8g8kX1PPxSFYl6hqldNX
2AcX7BFD3O8vJ8EtTNqJeauFWdL0Cdw/iPJGbSvDUeKPh1FeEZPz397xUnVdCTFT
cPDJOZwS6PN1rf+74lOAzf6zHOutM/gllEjq0Pv+06O/F7ENxjshZur7NdxL5TqV
6PLKL4//jNKXJITyLddbj/IJV0P61B5DYVuCl8Jjj1+z/l4x1qqEFefTOT+W28CD
j8kjRYnBbVal6fRRTi2/SFtdFaU/62JDrgLMV8njCqERBXOsYxlhG23ocEEYFeVx
/uMnMlPoV090EnvRg3VBj1GJ88vlCqbpM/F1J92RrTaTYQYGJWG/vQ==
=dPp+
-----END PGP SIGNATURE-----
Index: subversion/libsvn_wc/crop.c
===================================================================
--- subversion/libsvn_wc/crop.c (revision 893084)
+++ subversion/libsvn_wc/crop.c (working copy)
@@ -335,17 +335,6 @@
_("Can only crop a working copy with a restrictive depth"));
{
- svn_boolean_t hidden;
- SVN_ERR(svn_wc__db_node_hidden(&hidden, db, local_abspath, scratch_pool));
-
- if (hidden)
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
- _("The node '%s' was not found."),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
- }
-
- {
svn_wc__db_status_t status;
svn_wc__db_kind_t kind;
@@ -360,6 +349,13 @@
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Can only crop directories"));
+ if (status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_absent)
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ _("The node '%s' was not found."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
if (status == svn_wc__db_status_deleted ||
status == svn_wc__db_status_obstructed_delete)
return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 893084)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -706,7 +706,7 @@
else
{
SVN_ERR(svn_wc__set_depth(eb->db, eb->target_abspath,
- svn_depth_infinity, pool));
+ eb->requested_depth, pool));
}
}
Index: subversion/libsvn_wc/entries.c
===================================================================
--- subversion/libsvn_wc/entries.c (revision 893084)
+++ subversion/libsvn_wc/entries.c (working copy)
@@ -1567,10 +1567,7 @@
: NULL;
if (entry != NULL)
- {
- entry->depth = (depth == svn_depth_exclude) ? svn_depth_exclude
- : svn_depth_infinity;
- }
+ entry->depth = depth;
}
/* ### setting depth exclude on a wcroot breaks svn_wc_crop() */
Index: subversion/libsvn_wc/wc_db.c
===================================================================
--- subversion/libsvn_wc/wc_db.c (revision 893084)
+++ subversion/libsvn_wc/wc_db.c (working copy)
@@ -3120,9 +3120,6 @@
if (flush_entry_cache)
flush_entries(pdh);
- depth = (depth == svn_depth_exclude) ? svn_depth_exclude
- : svn_depth_infinity;
-
VERIFY_USABLE_PDH(pdh);
wcroot = pdh->wcroot;
sdb = wcroot->sdb;