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 2013/01/16 17:18:10 UTC
svn commit: r1434013 - /subversion/trunk/subversion/libsvn_wc/workqueue.c
Author: julianfoad
Date: Wed Jan 16 16:18:09 2013
New Revision: 1434013
URL: http://svn.apache.org/viewvc?rev=1434013&view=rev
Log:
Give more context in errors about running the WC DB work queue. Instead
of just giving the low-level error such as "file does not exist", also give a
"failed to run the work queue" error with WQ context info.
* subversion/libsvn_wc/workqueue.c
(dispatch_work_item): Remove some detail from an error message here.
(svn_wc__wq_run): Wrap any error in running a work item (including the
error above) in an error message that contains the work item id and skel.
Modified:
subversion/trunk/subversion/libsvn_wc/workqueue.c
Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=1434013&r1=1434012&r2=1434013&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Wed Jan 16 16:18:09 2013
@@ -1479,10 +1479,7 @@ dispatch_work_item(svn_wc__db_t *db,
Contrary to issue #1581, we cannot simply remove work items and
continue, so bail out with an error. */
return svn_error_createf(SVN_ERR_WC_BAD_ADM_LOG, NULL,
- _("Unrecognized work item in the queue "
- "associated with '%s'"),
- svn_dirent_local_style(wri_abspath,
- scratch_pool));
+ _("Unrecognized work item in the queue"));
}
return SVN_NO_ERROR;
@@ -1514,6 +1511,7 @@ svn_wc__wq_run(svn_wc__db_t *db,
{
apr_uint64_t id;
svn_skel_t *work_item;
+ svn_error_t *err;
svn_pool_clear(iterpool);
@@ -1533,8 +1531,20 @@ svn_wc__wq_run(svn_wc__db_t *db,
we're done. */
if (work_item == NULL)
break;
- SVN_ERR(dispatch_work_item(db, wri_abspath, work_item,
- cancel_func, cancel_baton, iterpool));
+
+ err = dispatch_work_item(db, wri_abspath, work_item,
+ cancel_func, cancel_baton, iterpool);
+ if (err)
+ {
+ const char *skel = svn_skel__unparse(work_item, scratch_pool)->data;
+
+ return svn_error_createf(SVN_ERR_WC_BAD_ADM_LOG, err,
+ _("Failed to run the WC DB work queue "
+ "associated with '%s', work item %d %s"),
+ svn_dirent_local_style(wri_abspath,
+ scratch_pool),
+ (int)id, skel);
+ }
/* The work item finished without error. Mark it completed
in the next loop. */