You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/04/15 17:58:00 UTC
svn commit: r1092751 - /subversion/trunk/subversion/libsvn_wc/deprecated.c
Author: julianfoad
Date: Fri Apr 15 15:58:00 2011
New Revision: 1092751
URL: http://svn.apache.org/viewvc?rev=1092751&view=rev
Log:
* subversion/libsvn_wc/deprecated.c
(svn_wc_queue_committed2): Add a 'const' to avoid a type conversion warning.
Modified:
subversion/trunk/subversion/libsvn_wc/deprecated.c
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1092751&r1=1092750&r2=1092751&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Fri Apr 15 15:58:00 2011
@@ -575,7 +575,7 @@ svn_wc_queue_committed2(svn_wc_committed
{
svn_wc_context_t *wc_ctx;
const char *local_abspath;
- svn_checksum_t *sha1_checksum = NULL;
+ const svn_checksum_t *sha1_checksum = NULL;
SVN_ERR(svn_wc_context_create(&wc_ctx, NULL, scratch_pool, scratch_pool));
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
@@ -1194,15 +1194,23 @@ svn_wc_set_changelist(const char *path,
{
const char *local_abspath;
svn_wc_context_t *wc_ctx;
+ svn_error_t *err;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL /* config */,
svn_wc__adm_get_db(adm_access),
pool));
- SVN_ERR(svn_wc_set_changelist2(wc_ctx, local_abspath, changelist, NULL,
- cancel_func, cancel_baton, notify_func,
- notify_baton, pool));
+ /* If the node is a directory, the old function always returned the error
+ * SVN_ERR_CLIENT_IS_DIRECTORY (despite this not being a client layer
+ * function and despite its doc string saying it would return
+ * SVN_ERR_UNSUPPORTED_FEATURE). */
+ err = svn_wc_set_changelist2(wc_ctx, local_abspath, changelist, NULL,
+ cancel_func, cancel_baton, notify_func,
+ notify_baton, pool);
+ if (err && err->apr_err == SVN_ERR_WC_NOT_FILE)
+ err->apr_err = SVN_ERR_CLIENT_IS_DIRECTORY;
+ SVN_ERR(err);
return svn_error_return(svn_wc_context_destroy(wc_ctx));
}