Index: subversion/libsvn_wc/adm_ops.c =================================================================== --- subversion/libsvn_wc/adm_ops.c (revision 19453) +++ subversion/libsvn_wc/adm_ops.c (working copy) @@ -200,7 +200,8 @@ &kind, pool)); if (kind == svn_node_file) - SVN_ERR(svn_wc__loggy_remove(logtags, adm_access, revert_file, pool)); + SVN_ERR(svn_wc__loggy_remove_file(logtags, adm_access, revert_file, + pool)); return SVN_NO_ERROR; } @@ -959,8 +960,8 @@ const char *svn_prop_file_path; SVN_ERR(svn_wc__prop_path(&svn_prop_file_path, base_name, was_kind, FALSE, pool)); - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - svn_prop_file_path, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + svn_prop_file_path, pool)); } @@ -1393,7 +1394,7 @@ baseprops = apr_hash_make(pool); SVN_ERR(svn_wc__load_prop_file(rprop, baseprops, pool)); /* Ensure the revert propfile gets removed. */ - SVN_ERR(svn_wc__loggy_remove + SVN_ERR(svn_wc__loggy_remove_file (&log_accum, adm_access, svn_path_is_child(adm_path, rprop, pool), pool)); *reverted = TRUE; @@ -1520,24 +1521,24 @@ { flags |= SVN_WC__ENTRY_MODIFY_CONFLICT_OLD; tmp_entry.conflict_old = NULL; - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - entry->conflict_old, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + entry->conflict_old, pool)); } if (entry->conflict_new) { flags |= SVN_WC__ENTRY_MODIFY_CONFLICT_NEW; tmp_entry.conflict_new = NULL; - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - entry->conflict_new, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + entry->conflict_new, pool)); } if (entry->conflict_wrk) { flags |= SVN_WC__ENTRY_MODIFY_CONFLICT_WRK; tmp_entry.conflict_wrk = NULL; - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - entry->conflict_wrk, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + entry->conflict_wrk, pool)); } /* Remove the prej-file if the entry lists one (and it exists) */ @@ -1545,8 +1546,8 @@ { flags |= SVN_WC__ENTRY_MODIFY_PREJFILE; tmp_entry.prejfile = NULL; - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - entry->prejfile, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + entry->prejfile, pool)); } /* Reset schedule attribute to svn_wc_schedule_normal. */ Index: subversion/libsvn_wc/lock.c =================================================================== --- subversion/libsvn_wc/lock.c (revision 19453) +++ subversion/libsvn_wc/lock.c (working copy) @@ -168,6 +168,7 @@ apr_hash_t *entries; apr_hash_index_t *hi; apr_pool_t *subpool = svn_pool_create(pool); + const char *adm_dir = svn_wc_get_adm_dir(pool); SVN_ERR(svn_wc_entries_read(&entries, adm_access, FALSE, pool)); @@ -213,6 +214,18 @@ } } + /* Remove wcprops directory and dir-props file. */ + SVN_ERR(svn_wc__loggy_remove_dir(&log_accum, adm_access, + svn_path_join(adm_dir, + SVN_WC__ADM_WCPROPS, pool), + pool)); + + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + svn_path_join(adm_dir, + SVN_WC__ADM_DIR_WCPROPS, + pool), + pool)); + return SVN_NO_ERROR; } Index: subversion/libsvn_wc/log.c =================================================================== --- subversion/libsvn_wc/log.c (revision 19453) +++ subversion/libsvn_wc/log.c (working copy) @@ -89,6 +89,9 @@ /* Remove file SVN_WC__LOG_ATTR_NAME. */ #define SVN_WC__LOG_RM "rm" +/* Remove directory SVN_WC__LOG_ATTR_NAME. */ +#define SVN_WC__LOG_RM_DIR "rm-dir" + /* Append file from SVN_WC__LOG_ATTR_NAME to SVN_WC__LOG_ATTR_DEST. */ #define SVN_WC__LOG_APPEND "append" @@ -635,16 +638,19 @@ } -/* Remove file NAME in log's CWD. */ +/* Remove file or directory NAME in log's CWD. */ static svn_error_t * -log_do_rm(struct log_runner *loggy, const char *name) +log_do_rm(struct log_runner *loggy, const char *name, svn_boolean_t is_dir) { const char *full_path = svn_path_join(svn_wc_adm_access_path(loggy->adm_access), name, loggy->pool); - svn_error_t *err = - svn_io_remove_file(full_path, loggy->pool); + svn_error_t *err; + if (is_dir) + err = svn_io_remove_dir(full_path, loggy->pool); + else + err = svn_io_remove_file(full_path, loggy->pool); if (err && APR_STATUS_IS_ENOENT(err->apr_err)) { @@ -1483,8 +1489,11 @@ err = log_do_modify_wcprop(loggy, name, atts); } else if (strcmp(eltname, SVN_WC__LOG_RM) == 0) { - err = log_do_rm(loggy, name); + err = log_do_rm(loggy, name, FALSE); } + else if (strcmp(eltname, SVN_WC__LOG_RM_DIR) == 0) { + err = log_do_rm(loggy, name, TRUE); + } else if (strcmp(eltname, SVN_WC__LOG_MERGE) == 0) { err = log_do_merge(loggy, name, atts); } @@ -1804,7 +1813,8 @@ /* File doesn't exists, the caller wants dst_path to be removed. */ else if (kind == svn_node_none && remove_dst_if_no_src) { - SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access, dst_path, pool)); + SVN_ERR(svn_wc__loggy_remove_file(log_accum, adm_access, dst_path, + pool)); if (dst_modified) *dst_modified = TRUE; @@ -2214,10 +2224,10 @@ } svn_error_t * -svn_wc__loggy_remove(svn_stringbuf_t **log_accum, - svn_wc_adm_access_t *adm_access, - const char *base_name, - apr_pool_t *pool) +svn_wc__loggy_remove_file(svn_stringbuf_t **log_accum, + svn_wc_adm_access_t *adm_access, + const char *base_name, + apr_pool_t *pool) { /* No need to check whether BASE_NAME exists: ENOENT is ignored by the log-runner */ @@ -2232,6 +2242,24 @@ } svn_error_t * +svn_wc__loggy_remove_dir(svn_stringbuf_t **log_accum, + svn_wc_adm_access_t *adm_access, + const char *base_name, + apr_pool_t *pool) +{ + /* No need to check whether BASE_NAME exists: ENOENT is ignored + by the log-runner */ + svn_xml_make_open_tag(log_accum, pool, + svn_xml_self_closing, + SVN_WC__LOG_RM_DIR, + SVN_WC__LOG_ATTR_NAME, + base_name, + NULL); + + return SVN_NO_ERROR; +} + +svn_error_t * svn_wc__loggy_upgrade_format(svn_stringbuf_t **log_accum, svn_wc_adm_access_t *adm_access, int format, Index: subversion/libsvn_wc/log.h =================================================================== --- subversion/libsvn_wc/log.h (revision 19453) +++ subversion/libsvn_wc/log.h (working copy) @@ -226,11 +226,20 @@ BASE_NAME, if it exists. */ svn_error_t * -svn_wc__loggy_remove(svn_stringbuf_t **log_accum, - svn_wc_adm_access_t *adm_access, - const char *base_name, - apr_pool_t *pool); +svn_wc__loggy_remove_file(svn_stringbuf_t **log_accum, + svn_wc_adm_access_t *adm_access, + const char *base_name, + apr_pool_t *pool); +/* Extend **LOG_ACCUM with log instructions to remove the dir + BASE_NAME, if it exists. +*/ +svn_error_t * +svn_wc__loggy_remove_dir(svn_stringbuf_t **log_accum, + svn_wc_adm_access_t *adm_access, + const char *base_name, + apr_pool_t *pool); + /* Extend **LOG_ACCUM with instructions to cause the working copy of ADM_ACCESS to be upgraded to FORMAT. */ svn_error_t * Index: subversion/libsvn_wc/props.c =================================================================== --- subversion/libsvn_wc/props.c (revision 19453) +++ subversion/libsvn_wc/props.c (working copy) @@ -413,7 +413,8 @@ else { /* No property modifications, remove the file instead. */ - SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access, real_props, pool)); + SVN_ERR(svn_wc__loggy_remove_file(log_accum, adm_access, real_props, + pool)); } /* Repeat the above steps for the base properties if required. */ @@ -444,8 +445,8 @@ real_prop_base, pool)); } else - SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access, real_prop_base, - pool)); + SVN_ERR(svn_wc__loggy_remove_file(log_accum, adm_access, + real_prop_base, pool)); } return SVN_NO_ERROR; @@ -780,8 +781,8 @@ reject_tmp_path, reject_path, pool)); /* And of course, delete the temporary reject file. */ - SVN_ERR(svn_wc__loggy_remove(entry_accum, adm_access, - reject_tmp_path, pool)); + SVN_ERR(svn_wc__loggy_remove_file(entry_accum, adm_access, + reject_tmp_path, pool)); /* Mark entry as "conflicted" with a particular .prej file. */ { Index: subversion/libsvn_wc/update_editor.c =================================================================== --- subversion/libsvn_wc/update_editor.c (revision 19453) +++ subversion/libsvn_wc/update_editor.c (working copy) @@ -2965,8 +2965,8 @@ local_tmp_text_path, base_name, FALSE, pool)); /* Remove the copy-source, making it look like a move */ - SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access, - local_tmp_text_path, pool)); + SVN_ERR(svn_wc__loggy_remove_file(&log_accum, adm_access, + local_tmp_text_path, pool)); } else SVN_ERR(svn_wc__loggy_move(&log_accum, NULL, adm_access,