Index: subversion/include/svn_types.h =================================================================== --- subversion/include/svn_types.h (revision 27972) +++ subversion/include/svn_types.h (working copy) @@ -237,6 +237,9 @@ typedef enum /* Depth undetermined or ignored. */ svn_depth_unknown = -2, + /* Exclude (i.e., don't descend into) directory D. */ + svn_depth_exclude = -1, + /* Just the named directory D, no entries. Updates will not pull in any files or subdirectories not already present. */ svn_depth_empty = 0, Index: subversion/libsvn_repos/reporter.c =================================================================== --- subversion/libsvn_repos/reporter.c (revision 27972) +++ subversion/libsvn_repos/reporter.c (working copy) @@ -967,13 +967,18 @@ delta_dirs(report_baton_t *b, svn_revnum s_entry = s_entries ? apr_hash_get(s_entries, name, APR_HASH_KEY_STRING) : NULL; - /* The only special case here is when requested_depth is files - but the reported path is a directory. This is technically - a client error, but we handle it anyway, by skipping the - entry. */ - if (requested_depth != svn_depth_files - || ((! t_entry || t_entry->kind != svn_node_dir) - && (! s_entry || s_entry->kind != svn_node_dir))) + /* The only special cases here are + + - When requested_depth is files but the reported path is + a directory. This is technically a client error, but we + handle it anyway, by skipping the entry. + + - When the reoprted depth is svn_depth_exclude. + */ + if ((! info || info->depth != svn_depth_exclude) + && (requested_depth != svn_depth_files + || ((! t_entry || t_entry->kind != svn_node_dir) + && (! s_entry || s_entry->kind != svn_node_dir)))) SVN_ERR(update_entry(b, s_rev, s_fullpath, s_entry, t_fullpath, t_entry, dir_baton, e_fullpath, info, info ? info->depth Index: subversion/libsvn_subr/kitchensink.c =================================================================== --- subversion/libsvn_subr/kitchensink.c (revision 27972) +++ subversion/libsvn_subr/kitchensink.c (working copy) @@ -73,6 +73,8 @@ svn_depth_to_word(svn_depth_t depth) { switch (depth) { + case svn_depth_exclude: + return "exclude"; case svn_depth_unknown: return "unknown"; case svn_depth_empty: @@ -92,6 +94,8 @@ svn_depth_to_word(svn_depth_t depth) svn_depth_t svn_depth_from_word(const char *word) { + if (strcmp(word, "exclude") == 0) + return svn_depth_exclude; if (strcmp(word, "unknown") == 0) return svn_depth_unknown; if (strcmp(word, "empty") == 0) Index: subversion/svn/main.c =================================================================== --- subversion/svn/main.c (revision 27972) +++ subversion/svn/main.c (working copy) @@ -1251,7 +1251,8 @@ main(int argc, const char *argv[]) _("Error converting depth " "from locale to UTF8")), pool, "svn: "); opt_state.depth = svn_depth_from_word(utf8_opt_arg); - if (opt_state.depth == svn_depth_unknown) + if (opt_state.depth == svn_depth_unknown + || opt_state.depth == svn_depth_exclude) { return svn_cmdline_handle_exit_error (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,